summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-01-16 04:35:54 +0100
committerKay Sievers <kay@vrfy.org>2013-01-16 04:35:54 +0100
commitbdffb521d01a2e2bc342154d74cb519755c52c25 (patch)
treed220ecc816c822d6980963d7da8da01b02055a15 /src
parent3a7b06c8a8856381810352dce3369ca20f3b9fc6 (diff)
shutdown: ignore loop devices without a backing file
Diffstat (limited to 'src')
-rw-r--r--src/core/umount.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/umount.c b/src/core/umount.c
index c7b6cee079..f0f2711295 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;