chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net-util: don't use libudev
[elogind.git]
/
src
/
udev
/
udev-builtin-net_setup_link.c
diff --git
a/src/udev/udev-builtin-net_setup_link.c
b/src/udev/udev-builtin-net_setup_link.c
index 6a98b802b2faf7cce52e30d8705d7baa58cf093e..e6ffa53400c6952c41d11a67d74bc3936444e9f6 100644
(file)
--- 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) {
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;
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 (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;
}
return EXIT_SUCCESS;
}