From 847a8a5fed4d265dfa659917515c6f9bd1b8d5c4 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 21 Feb 2014 16:54:00 +0100 Subject: udev - link-setup - expose ID_NET_DRIVER This is the same as shown by 'ethtool -i ', and is sometimes set even though DRIVER is not. --- src/udev/udev-builtin-net_setup_link.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to '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 b7ba8c9060..3cd384e94d 100644 --- a/src/udev/udev-builtin-net_setup_link.c +++ b/src/udev/udev-builtin-net_setup_link.c @@ -26,6 +26,7 @@ static link_config_ctx *ctx = NULL; static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) { + _cleanup_free_ char *driver = NULL; const char *name; link_config *link; int r; @@ -35,6 +36,10 @@ static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv return EXIT_FAILURE; } + r = link_get_driver(ctx, dev, &driver); + if (r >= 0) + udev_builtin_add_property(dev, test, "ID_NET_DRIVER", driver); + r = link_config_get(ctx, dev, &link); if (r < 0) { if (r == -ENOENT) { -- cgit v1.2.3-54-g00ecf