summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-06-28 09:30:08 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-02 00:26:23 +0200
commitdee87d612d295d9c8642b76c716b8e357411e65a (patch)
treef0742ed327b6d76877965b31a2d9f83e1f966350
parente05b415e950a548146c6f6dd799dc7d2b7d7892b (diff)
umount: ignore missing /proc/swaps
/proc/swaps does not exist when swap is disabled in the kernel. Just report an empty list of mountpoints to unmount in this case.
-rw-r--r--src/umount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/umount.c b/src/umount.c
index 3d328e0da9..95efa8204b 100644
--- 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");