summaryrefslogtreecommitdiff
path: root/src/core/umount.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-01-20 16:18:00 +0100
committerKay Sievers <kay@vrfy.org>2013-01-20 16:18:00 +0100
commite1af7092a8e124eff5f7a668f0f1562c4df4b02f (patch)
tree2d76873e5fda143e0cb94161812e205ea1d8f8c7 /src/core/umount.c
parent746c8397a011fe6c45a5be275554c77d22e58340 (diff)
shutdown: loop - convert to enumerate match
Diffstat (limited to 'src/core/umount.c')
-rw-r--r--src/core/umount.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/umount.c b/src/core/umount.c
index f0f2711295..3fcb90eca4 100644
--- a/src/core/umount.c
+++ b/src/core/umount.c
@@ -219,7 +219,8 @@ static int loopback_list_get(MountPoint **head) {
}
if (udev_enumerate_add_match_subsystem(e, "block") < 0 ||
- udev_enumerate_add_match_sysname(e, "loop*") < 0) {
+ udev_enumerate_add_match_sysname(e, "loop*") < 0 ||
+ udev_enumerate_add_match_sysattr(e, "loop/backing_file", NULL) < 0) {
r = -EIO;
goto finish;
}
@@ -233,7 +234,6 @@ 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;
@@ -242,12 +242,6 @@ 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;