summaryrefslogtreecommitdiff
path: root/src/udev/net
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 21:53:34 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-07 01:19:56 +0100
commitb5884878a2874447b2a9f07f324a7cd909d96d48 (patch)
tree7187916b29404dad30f53be8ed0393a095571e0d /src/udev/net
parentf2997962ff8aeea577bed878d3bc4e4f64784e45 (diff)
util: simplify proc_cmdline() to reuse get_process_cmdline()
Also, make all parsing of the kernel cmdline non-fatal.
Diffstat (limited to 'src/udev/net')
-rw-r--r--src/udev/net/link-config.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 428a71dce3..5aefb7d415 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -174,11 +174,10 @@ static bool enable_name_policy(void) {
size_t l;
r = proc_cmdline(&line);
- if (r < 0)
- log_warning("Failed to read /proc/cmdline, ignoring: %s",
- strerror(-r));
- if (r <= 0)
+ if (r < 0) {
+ log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return true;
+ }
FOREACH_WORD_QUOTED(word, l, line, state)
if (strneq(word, "net.ifnames=0", l))