summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-builtin-net_setup_link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-30 04:10:19 +0100
committerTom Gundersen <teg@jklm.no>2013-10-30 15:36:04 +0100
commit3e137a1b9a0eac2bf43d493d3302c3c959b6ccdb (patch)
treec62ca7aa5a75856fcf58ae14ba4f4cc545cca3f0 /src/udev/udev-builtin-net_setup_link.c
parentmachinectl: privileged option is gone (diff)
downloadsystemd-3e137a1b9a0eac2bf43d493d3302c3c959b6ccdb.tar.xz
systemd-3e137a1b9a0eac2bf43d493d3302c3c959b6ccdb.zip
udev: link-config - let udevd set the ifname
Diffstat (limited to 'src/udev/udev-builtin-net_setup_link.c')
-rw-r--r--src/udev/udev-builtin-net_setup_link.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
index 6a98b802b2..e6ffa53400 100644
--- a/src/udev/udev-builtin-net_setup_link.c
+++ b/src/udev/udev-builtin-net_setup_link.c
@@ -26,6 +26,7 @@
link_config_ctx *ctx;
static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) {
+ const char *name;
link_config *link;
int r;
@@ -45,12 +46,15 @@ static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv
}
}
- r = link_config_apply(ctx, link, dev);
+ r = link_config_apply(ctx, link, dev, &name);
if (r < 0) {
log_error("Could not apply link config to %s", udev_device_get_sysname(dev));
return EXIT_FAILURE;
}
+ if (name)
+ udev_builtin_add_property(dev, test, "ID_NET_NAME", name);
+
return EXIT_SUCCESS;
}