summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-20 19:19:53 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-20 19:19:53 +0100
commit16354eff99fe673f912862138c4dce30bbd0afb5 (patch)
treef08b5fd25de0e3b34e3ea50062028af9e953e8c1 /load-fragment.c
parent5899f3b7f62151dade30010370fb5d2bcdb93d3a (diff)
make use of logging API wherever appropriate
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/load-fragment.c b/load-fragment.c
index ed96865248..ed046d0356 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -8,6 +8,7 @@
#include "strv.h"
#include "conf-parser.h"
#include "load-fragment.h"
+#include "log.h"
static int config_parse_deps(
const char *filename,
@@ -130,12 +131,19 @@ static int config_parse_listen(
void *data,
void *userdata) {
+ int r;
+
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(
@@ -158,8 +166,10 @@ static int config_parse_type(
*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 0;
}