[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Tue Jan 15 19:41:47 PST 2013


 src/core/umount.c |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit bdffb521d01a2e2bc342154d74cb519755c52c25
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jan 16 04:35:54 2013 +0100

    shutdown: ignore loop devices without a backing file

diff --git a/src/core/umount.c b/src/core/umount.c
index c7b6cee..f0f2711 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;



More information about the systemd-commits mailing list