]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: do not ignore -ENOENT from sd_device_get_devname() for block device 24725/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 18 Sep 2022 14:32:21 +0000 (23:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 18 Sep 2022 14:32:24 +0000 (23:32 +0900)
We already checked that the sd_device object 'dev' is for a whole block
device. So, -ENOENT should not be triggeered here, and if it is, there
exists something spurious. Hence we should not ignore the failure.

src/udev/udevd.c

index 9900a9363ea311ca44bfd56dd36c0b176584c8df..5ea197c1c48cf1f9485acc105b115d7542dbfdd9 100644 (file)
@@ -495,8 +495,6 @@ static int device_get_whole_disk(sd_device *dev, sd_device **ret_device, const c
                 return log_device_debug_errno(dev, r, "Failed to get whole disk device: %m");
 
         r = sd_device_get_devname(dev, &val);
-        if (r == -ENOENT)
-                goto irrelevant;
         if (r < 0)
                 return log_device_debug_errno(dev, r, "Failed to get devname: %m");