mirror of
https://github.com/systemd/systemd.git
synced 2024-11-05 06:52:22 +03:00
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 2b49732c3d
.
This commit is contained in:
parent
aa0e72ea54
commit
9fecce8041
@ -2146,8 +2146,8 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
|
|||||||
sprintf(ifindex_str, "n%d", link->ifindex);
|
sprintf(ifindex_str, "n%d", link->ifindex);
|
||||||
device = udev_device_new_from_device_id(m->udev, ifindex_str);
|
device = udev_device_new_from_device_id(m->udev, ifindex_str);
|
||||||
if (!device) {
|
if (!device) {
|
||||||
log_warning_link(link, "could not find udev device");
|
log_warning_link(link, "could not find udev device: %m");
|
||||||
return -ENOENT;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udev_device_get_is_initialized(device) <= 0) {
|
if (udev_device_get_is_initialized(device) <= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user