Don't umount proc in umount -a
This commit is contained in:
parent
bea831d2e6
commit
14716af472
3
umount.c
3
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user