summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-30 21:26:22 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-31 00:25:24 +0200
commit20ba5a3fe7c387eae72ca3e0bd1e6eeee3f50f3b (patch)
tree5b9bd40709644bf60596c6693949c8eb82774902 /src/udev
parentsd-device: do not ignore critical errors in device_new_from_child() (diff)
downloadsystemd-20ba5a3fe7c387eae72ca3e0bd1e6eeee3f50f3b.tar.xz
systemd-20ba5a3fe7c387eae72ca3e0bd1e6eeee3f50f3b.zip
udev: ignore one more error in device_get_block_device()
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 1cde6b9c9c..21e3c3558f 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -451,6 +451,8 @@ static int device_get_block_device(sd_device *dev, const char **ret) {
return log_device_debug_errno(dev, r, "Failed to get devtype: %m");
if (r >= 0 && streq(val, "partition")) {
r = sd_device_get_parent(dev, &dev);
+ if (r == -ENOENT) /* The device may be already removed. */
+ goto irrelevant;
if (r < 0)
return log_device_debug_errno(dev, r, "Failed to get parent device: %m");
}