chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make use of logging API wherever appropriate
[elogind.git]
/
load-fragment.c
diff --git
a/load-fragment.c
b/load-fragment.c
index ed96865248d106210163baea7f169a0b4741bc94..ed046d0356e5628e795cf79347f5d05c0e79466c 100644
(file)
--- a/
load-fragment.c
+++ b/
load-fragment.c
@@
-8,6
+8,7
@@
#include "strv.h"
#include "conf-parser.h"
#include "load-fragment.h"
#include "strv.h"
#include "conf-parser.h"
#include "load-fragment.h"
+#include "log.h"
static int config_parse_deps(
const char *filename,
static int config_parse_deps(
const char *filename,
@@
-130,12
+131,19
@@
static int config_parse_listen(
void *data,
void *userdata) {
void *data,
void *userdata) {
+ int r;
+
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- return address_parse(data, rvalue);
+ if ((r = address_parse(data, rvalue)) < 0) {
+ log_error("[%s:%u] Failed to parse address value: %s", filename, line, rvalue);
+ return r;
+ }
+
+ return 0;
}
static int config_parse_type(
}
static int config_parse_type(
@@
-158,8
+166,10
@@
static int config_parse_type(
*type = SOCK_STREAM;
else if (streq(rvalue, "dgram"))
*type = SOCK_DGRAM;
*type = SOCK_STREAM;
else if (streq(rvalue, "dgram"))
*type = SOCK_DGRAM;
- else
+ else {
+ log_error("[%s:%u] Failed to parse socket type value: %s", filename, line, rvalue);
return -EINVAL;
return -EINVAL;
+ }
return 0;
}
return 0;
}