sd-device: make sd_device_get_devtype() return 0 on success again
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Aug 2024 19:01:47 +0000 (04:01 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 Aug 2024 20:18:14 +0000 (05:18 +0900)
commit1937f5105d375ba3fbf7fa65366e6435d6b36b5a
tree1be72492e0e5c8d4f34e65d563514ac34280ca12
parent803a3924715f21ac9d3392793e6ec669349fbac9
sd-device: make sd_device_get_devtype() return 0 on success again

This partially reverts the commit 730b76bd2cd5f0866baa738ae283e3b62544a28f.

Before the commit, the function returned 0 on success, but the commit
made the function always return 1, as if device->devtype is NULL, the
function returns -ENOENT in the above.

Fortunately, udev_device_get_devtype() does not propagate any
non-negative value from sd_device_get_devtype(). Hence, hopefully we can
safely revert the change.
src/libsystemd/sd-device/sd-device.c