diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-09 15:39:29 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-10 09:18:53 +0100 |
commit | d61db498bf86fe64c66e30d15aafc020cc87d068 (patch) | |
tree | f863b54e27a624ece6629f93fc358ada9ddef751 | |
parent | Merge pull request #17551 from yuwata/radv-router-lifetime (diff) | |
download | systemd-d61db498bf86fe64c66e30d15aafc020cc87d068.tar.xz systemd-d61db498bf86fe64c66e30d15aafc020cc87d068.zip |
udev: log when we fail to query ID_NET_DRIVER
Inspired by #17532.
Diffstat (limited to '')
-rw-r--r-- | src/udev/udev-builtin-net_setup_link.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c index ef101381f4..cb12b943fe 100644 --- a/src/udev/udev-builtin-net_setup_link.c +++ b/src/udev/udev-builtin-net_setup_link.c @@ -19,7 +19,10 @@ static int builtin_net_setup_link(sd_device *dev, int argc, char **argv, bool te return log_device_error_errno(dev, SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments."); r = link_get_driver(ctx, dev, &driver); - if (r >= 0) + if (r < 0) + log_device_full_errno(dev, r == -EOPNOTSUPP ? LOG_DEBUG : LOG_WARNING, + r, "Failed to query device driver: %m"); + else udev_builtin_add_property(dev, test, "ID_NET_DRIVER", driver); r = link_config_get(ctx, dev, &link); |