shutdown: ignore loop devices without a backing file
This commit is contained in:
parent
3a7b06c8a8
commit
bdffb521d0
|
@ -233,6 +233,7 @@ static int loopback_list_get(MountPoint **head) {
|
||||||
udev_list_entry_foreach(item, first) {
|
udev_list_entry_foreach(item, first) {
|
||||||
MountPoint *lb;
|
MountPoint *lb;
|
||||||
struct udev_device *d;
|
struct udev_device *d;
|
||||||
|
const char *backing;
|
||||||
char *loop;
|
char *loop;
|
||||||
const char *dn;
|
const char *dn;
|
||||||
|
|
||||||
|
@ -241,6 +242,12 @@ static int loopback_list_get(MountPoint **head) {
|
||||||
goto finish;
|
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))) {
|
if (!(dn = udev_device_get_devnode(d))) {
|
||||||
udev_device_unref(d);
|
udev_device_unref(d);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue