summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-31 15:26:20 +0200
committerTom Gundersen <teg@jklm.no>2014-08-01 11:56:13 +0200
commit9fecce8041ddf570f141c69efdaa3d73d6403d20 (patch)
tree08020c501074168079d00b626105174682183371 /src/network
parentaa0e72ea54aaa9a0e7badfb3593cbf7e6e303345 (diff)
Revert "networkd: don't assume udev_device_new_from_device_id sets errno"
libudev now does set errno correctly, so we can indeed rely on this. This reverts commit 2b49732c3d511007ae2c413997e56c40f678d79a.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 5b1376ad3e..ec1a97a7c9 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2146,8 +2146,8 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
sprintf(ifindex_str, "n%d", link->ifindex);
device = udev_device_new_from_device_id(m->udev, ifindex_str);
if (!device) {
- log_warning_link(link, "could not find udev device");
- return -ENOENT;
+ log_warning_link(link, "could not find udev device: %m");
+ return -errno;
}
if (udev_device_get_is_initialized(device) <= 0) {