shutdown: ignore loop devices without a backing file

This commit is contained in:
Kay Sievers 2013-01-16 04:35:54 +01:00
parent 3a7b06c8a8
commit bdffb521d0
1 changed files with 7 additions and 0 deletions

View File

@ -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;