[PATCH] Use update_mtab() when using -f to prevent duplicate entries from being created.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 mount/mount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mount/mount.c b/mount/mount.c
index 8e850b0..ea5ddc9 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -759,7 +759,7 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
 		print_one (&mnt);
 
 	if (!nomtab && mtab_is_writable()) {
-		if (flags & MS_REMOUNT)
+		if (fake || (flags & MS_REMOUNT))
 			update_mtab (mnt.mnt_dir, &mnt);
 		else {
 			mntFILE *mfp;
-- 
1.5.1

-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux