From: Kay Sievers Date: Wed, 16 Jan 2013 03:35:54 +0000 (+0100) Subject: shutdown: ignore loop devices without a backing file X-Git-Tag: v198~514 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=bdffb521d01a2e2bc342154d74cb519755c52c25 shutdown: ignore loop devices without a backing file --- diff --git a/src/core/umount.c b/src/core/umount.c index c7b6cee07..f0f271129 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -233,6 +233,7 @@ static int loopback_list_get(MountPoint **head) { udev_list_entry_foreach(item, first) { MountPoint *lb; struct udev_device *d; + const char *backing; char *loop; const char *dn; @@ -241,6 +242,12 @@ static int loopback_list_get(MountPoint **head) { goto finish; } + backing = udev_device_get_sysattr_value(d, "loop/backing_file"); + if (!backing) { + udev_device_unref(d); + continue; + } + if (!(dn = udev_device_get_devnode(d))) { udev_device_unref(d); continue;