mount: -o remount should not add lines to /etc/mtab
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 14 Sep 2006 16:09:27 +0000 (16:09 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 14 Sep 2006 16:09:27 +0000 (16:09 -0000)
util-linux/mount.c

index 5592a7a5f64927d7d8edf46661072b8b4a984fe1..4660b27ef7a35892f01c500e0c063656e861ac00 100644 (file)
@@ -222,7 +222,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
        /* If the mount was successful, and we're maintaining an old-style
         * mtab file by hand, add the new entry to it now. */
 
-       if(ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc) {
+       if(ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
                char dirbuf[PATH_MAX];
                char srcbuf[PATH_MAX];
                FILE *mountTable = setmntent(bb_path_mtab_file, "a+");