[systemd-commits] src/core
Kay Sievers
kay at kemper.freedesktop.org
Sun Jan 20 07:23:43 PST 2013
src/core/umount.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
New commits:
commit e1af7092a8e124eff5f7a668f0f1562c4df4b02f
Author: Kay Sievers <kay at vrfy.org>
Date: Sun Jan 20 16:18:00 2013 +0100
shutdown: loop - convert to enumerate match
diff --git a/src/core/umount.c b/src/core/umount.c
index f0f2711..3fcb90e 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;
More information about the systemd-commits
mailing list