mirror of
https://github.com/systemd/systemd.git
synced 2025-09-23 17:45:04 +03:00
libudev: conserve previous behavior
The commit dcfbde3a43
changes
sd_device_get_ifindex() returns -ENOENT instead of zero if the device
does not have ifindex.
Let's keep the original behavior of udev_device_get_ifindex().
Fixes #10699.
This commit is contained in:
@@ -52,6 +52,8 @@ int udev_device_get_ifindex(struct udev_device *udev_device) {
|
||||
assert(udev_device);
|
||||
|
||||
r = sd_device_get_ifindex(udev_device->device, &ifindex);
|
||||
if (r == -ENOENT)
|
||||
return 0;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Reference in New Issue
Block a user