chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a7b06c
)
shutdown: ignore loop devices without a backing file
author
Kay Sievers
<kay@vrfy.org>
Wed, 16 Jan 2013 03:35:54 +0000
(
04:35
+0100)
committer
Kay Sievers
<kay@vrfy.org>
Wed, 16 Jan 2013 03:35:54 +0000
(
04:35
+0100)
src/core/umount.c
patch
|
blob
|
history
diff --git
a/src/core/umount.c
b/src/core/umount.c
index c7b6cee07975db037d56c1c6ec0d96f2db2a38ae..f0f2711295e9c6536288f232ec3c277f8c37ae93 100644
(file)
--- a/
src/core/umount.c
+++ b/
src/core/umount.c
@@
-233,6
+233,7
@@
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;
@@
-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))) {
udev_device_unref(d);
continue;
if (!(dn = udev_device_get_devnode(d))) {
udev_device_unref(d);
continue;