commit 14716af4723e94913dfaf4516b975db1a764b5e8 Author: sin <s...@2f30.org> Date: Wed Mar 12 16:35:20 2014 +0200
Don't umount proc in umount -a diff --git a/umount.c b/umount.c index d04410a..46143c1 100644 --- a/umount.c +++ b/umount.c @@ -2,6 +2,7 @@ #include <mntent.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/mount.h> #include "util.h" @@ -47,6 +48,8 @@ main(int argc, char *argv[]) if (!fp) eprintf("setmntent %s:", "/etc/mtab"); while ((me = getmntent(fp))) { + if (strcmp(me->mnt_type, "proc") == 0) + continue; if (umount2(me->mnt_dir, flags) < 0) { weprintf("umount2:"); ret = EXIT_FAILURE;