diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-11 23:33:17 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-12 13:00:30 +0900 |
commit | 8ecbc4b880b91e997babc924fccb7cbebb8b0943 (patch) | |
tree | cbc8263ce027414a2eaecd37bcc536868511c871 /src/libudev | |
parent | 5fb0720ebbf8813696b095806581a937a345cf2c (diff) | |
download | systemd-8ecbc4b880b91e997babc924fccb7cbebb8b0943.tar.gz |
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.
Diffstat (limited to 'src/libudev')
-rw-r--r-- | src/libudev/libudev-device-private.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index a7868a11cb..70b00c1498 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -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; |