commit d06158ccf9c06d143cef841d01167632031e19e8
Author: sin <[email protected]>
Date:   Tue Mar 18 16:26:33 2014 +0200

    Use /proc/mounts instead of /etc/mtab
    
    Let the kernel keep track of mounted filesystems, no need to use
    /etc/mtab as we are not modifying it.

diff --git a/umount.c b/umount.c
index 429ada1..3650709 100644
--- a/umount.c
+++ b/umount.c
@@ -64,9 +64,9 @@ umountall(int flags)
        char **mntdirs = NULL;
        int len = 0;
 
-       fp = setmntent("/etc/mtab", "r");
+       fp = setmntent("/proc/mounts", "r");
        if (!fp)
-               eprintf("setmntent %s:", "/etc/mtab");
+               eprintf("setmntent %s:", "/proc/mounts");
        while ((me = getmntent(fp))) {
                if (strcmp(me->mnt_type, "proc") == 0)
                        continue;


Reply via email to