From dee87d612d295d9c8642b76c716b8e357411e65a Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Tue, 28 Jun 2011 09:30:08 +0200 Subject: [PATCH 1/1] 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. --- src/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/umount.c b/src/umount.c index 3d328e0da..95efa8204 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"); -- 2.30.2