1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-03 13:47:04 +03:00

libudev: conserve previous behavior

The commit dcfbde3a43d632ff6e286c77e1081087eca59d8e 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:
Yu Watanabe 2018-11-11 23:33:17 +09:00
parent 5fb0720ebb
commit 8ecbc4b880

View File

@ -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;