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:
e05b415
)
umount: ignore missing /proc/swaps
author
Michael Olbrich
<m.olbrich@pengutronix.de>
Tue, 28 Jun 2011 07:30:08 +0000
(09:30 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 1 Jul 2011 22:26:23 +0000
(
00:26
+0200)
/proc/swaps does not exist when swap is disabled in the kernel.
Just report an empty list of mountpoints to unmount in this case.
src/umount.c
patch
|
blob
|
history
diff --git
a/src/umount.c
b/src/umount.c
index 3d328e0da955ecf855564b1067e5310d6afe9f1a..95efa8204b2e9e9cb11e2cf07666d1556251354d 100644
(file)
--- a/
src/umount.c
+++ b/
src/umount.c
@@
-146,7
+146,7
@@
static int swap_list_get(MountPoint **head) {
assert(head);
if (!(proc_swaps = fopen("/proc/swaps", "re")))
- return -errno;
+ return
(errno == ENOENT) ? 0 :
-errno;
(void) fscanf(proc_swaps, "%*s %*s %*s %*s %*s\n");