summaryrefslogtreecommitdiff
path: root/src/udev/net/link-config.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-14 19:48:04 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-14 21:29:27 -0500
commit6b3d378331fe714c7bf2263eaa9a8b33fc878e7c (patch)
tree5fca867e0b2cda62c2dc4f1a9a4bd78ab345b158 /src/udev/net/link-config.c
parentab8864ebc3ac01288729b44f0d5f18fff37defb5 (diff)
parentbafbac4e85a5eefd4b57a5cd0eb61885fb60edc9 (diff)
Merge pull request #4879 from poettering/systemd
Diffstat (limited to 'src/udev/net/link-config.c')
-rw-r--r--src/udev/net/link-config.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 1dca375279..3af87f1388 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -192,14 +192,9 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
}
static bool enable_name_policy(void) {
- _cleanup_free_ char *value = NULL;
- int r;
-
- r = get_proc_cmdline_key("net.ifnames=", &value);
- if (r > 0 && streq(value, "0"))
- return false;
+ bool b;
- return true;
+ return proc_cmdline_get_bool("net.ifnames", &b) <= 0 || b;
}
int link_config_load(link_config_ctx *ctx) {