[patch] mount add move option

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

 



klibc mount has only short options thus uses the following syntax
to move a mounted tree:
mount -o move /sys /root/sys

this generates the following error on util-linux-ng mount:
mount: you must specify the filesystem type

belows patch is enough to add an alternative to
mount --move /olddir /newdir

Reported-by: Michael Prokop <mika@xxxxxxxx>
Signed-off-by: maximilian attems <max@xxxxxxx>

diff --git a/mount/mount.c b/mount/mount.c
index 30688ac..7e41fdf 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -135,6 +135,7 @@ static const struct opt_map opt_map[] = {
   { "remount",  0, 0, MS_REMOUNT},      /* Alter flags of mounted FS */
   { "bind",	0, 0, MS_BIND   },	/* Remount part of tree elsewhere */
   { "rbind",	0, 0, MS_BIND|MS_REC }, /* Idem, plus mounted subtrees */
+  { "move",	0, 0, MS_MOVE },	/* Move mounted tree elsewhere */
   { "auto",	0, 1, MS_NOAUTO	},	/* Can be mounted using -a */
   { "noauto",	0, 0, MS_NOAUTO	},	/* Can  only be mounted explicitly */
   { "users",	0, 0, MS_USERS	},	/* Allow ordinary user to mount */
--
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