chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shutdown: loop - convert to enumerate match
[elogind.git]
/
src
/
core
/
umount.c
diff --git
a/src/core/umount.c
b/src/core/umount.c
index f0f2711295e9c6536288f232ec3c277f8c37ae93..3fcb90eca4d9219e128cca90c957b668ffd15b04 100644
(file)
--- 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 ||
}
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;
}
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;
udev_list_entry_foreach(item, first) {
MountPoint *lb;
struct udev_device *d;
- const char *backing;
char *loop;
const char *dn;
char *loop;
const char *dn;
@@
-242,12
+242,6
@@
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))) {
udev_device_unref(d);
continue;
if (!(dn = udev_device_get_devnode(d))) {
udev_device_unref(d);
continue;