mirror of
https://github.com/systemd/systemd.git
synced 2025-03-13 00:58:27 +03:00
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) {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user