chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fstab-generator: don't accept missing root=, but accept root=none
[elogind.git]
/
src
/
shared
/
conf-parser.c
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index 94808fa6ce1a3a5a885ce54fcfbc817a39d6cdaf..2148a30c66c1791e8dd233372a38d82b6d38736f 100644
(file)
--- a/
src/shared/conf-parser.c
+++ b/
src/shared/conf-parser.c
@@
-22,9
+22,7
@@
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
-#include <assert.h>
#include <stdlib.h>
#include <stdlib.h>
-#include <netinet/ether.h>
#include "conf-parser.h"
#include "conf-files.h"
#include "conf-parser.h"
#include "conf-files.h"
@@
-34,8
+32,6
@@
#include "log.h"
#include "utf8.h"
#include "path-util.h"
#include "log.h"
#include "utf8.h"
#include "path-util.h"
-#include "set.h"
-#include "exit-status.h"
#include "sd-messages.h"
int log_syntax_internal(
#include "sd-messages.h"
int log_syntax_internal(
@@
-61,7
+57,7
@@
int log_syntax_internal(
if (unit)
r = log_struct_internal(level,
if (unit)
r = log_struct_internal(level,
- error
> 0 ? error : EINVAL
,
+ error,
file, line, func,
getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit,
LOG_MESSAGE_ID(SD_MESSAGE_CONFIG_ERROR),
file, line, func,
getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit,
LOG_MESSAGE_ID(SD_MESSAGE_CONFIG_ERROR),
@@
-71,7
+67,7
@@
int log_syntax_internal(
NULL);
else
r = log_struct_internal(level,
NULL);
else
r = log_struct_internal(level,
- error
> 0 ? error : EINVAL
,
+ error,
file, line, func,
LOG_MESSAGE_ID(SD_MESSAGE_CONFIG_ERROR),
"CONFIG_FILE=%s", config_file,
file, line, func,
LOG_MESSAGE_ID(SD_MESSAGE_CONFIG_ERROR),
"CONFIG_FILE=%s", config_file,
@@
-367,7
+363,7
@@
int config_parse(const char *unit,
if (feof(f))
break;
if (feof(f))
break;
- log_error
(
"Failed to read configuration file '%s': %m", filename);
+ log_error
_errno(errno,
"Failed to read configuration file '%s': %m", filename);
return -errno;
}
return -errno;
}
@@
-823,8
+819,7
@@
int config_parse_log_facility(
x = log_facility_unshifted_from_string(rvalue);
if (x < 0) {
x = log_facility_unshifted_from_string(rvalue);
if (x < 0) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Failed to parse log facility, ignoring: %s", rvalue);
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse log facility, ignoring: %s", rvalue);
return 0;
}
return 0;
}
@@
-855,8
+850,7
@@
int config_parse_log_level(
x = log_level_from_string(rvalue);
if (x < 0) {
x = log_level_from_string(rvalue);
if (x < 0) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Failed to parse log level, ignoring: %s", rvalue);
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse log level, ignoring: %s", rvalue);
return 0;
}
return 0;
}