From 3821f4888a5ae37443fecfca861c35d28092c0ed Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 26 Jul 2007 14:39:03 +0200 Subject: [PATCH] mount: fix -f -o remount Bug: $ mount -fv / -o remount mount: according to mtab, /dev/sda3 is already mounted on / Signed-off-by: Karel Zak --- mount/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/mount.c b/mount/mount.c index 50089a9a..6caea64a 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -1036,7 +1036,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, /* The "mount -f" checks for for existing record in /etc/mtab (with * regular non-fake mount this is usually done by kernel) */ - if (fake && mounted (spec, node)) + if (!(flags & MS_REMOUNT) && fake && mounted (spec, node)) die(EX_USAGE, _("mount: according to mtab, " "%s is already mounted on %s\n"), spec, node); -- 2.39.5