From: Karel Zak Date: Tue, 6 Nov 2007 00:05:27 +0000 (+0100) Subject: mount: remove MS_{REPLACE,AFTER,BEFORE,OVER} X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e71f7ad58d4d33814991b07f95905f738e0923e;p=util-linux mount: remove MS_{REPLACE,AFTER,BEFORE,OVER} mount(8) and linux kernel don't support these mount flags. It's legacy from an unimplemented stuff. Signed-off-by: Karel Zak --- diff --git a/mount/mount.c b/mount/mount.c index 9d43e5ff..154f0da5 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -77,8 +77,8 @@ static int optfork = 0; /* Add volumelabel in a listing of mounted devices (-l). */ static int list_with_volumelabel = 0; -/* Nonzero for mount {--bind|--replace|--before|--after|--over|--move| - * make-shared|make-private|make-unbindable|make-slave} +/* Nonzero for mount {bind|move|make-shared|make-private| + * make-unbindable|make-slave} */ static int mounttype = 0; @@ -1672,10 +1672,6 @@ static struct option longopts[] = { { "pass-fd", 1, 0, 'p' }, { "types", 1, 0, 't' }, { "bind", 0, 0, 128 }, - { "replace", 0, 0, 129 }, - { "after", 0, 0, 130 }, - { "before", 0, 0, 131 }, - { "over", 0, 0, 132 }, { "move", 0, 0, 133 }, { "guess-fstype", 1, 0, 134 }, { "rbind", 0, 0, 135 }, @@ -1729,10 +1725,7 @@ usage (FILE *fp, int n) { "Other options: [-nfFrsvw] [-o options] [-p passwdfd].\n" "For many more details, say man 8 mount .\n" )); -/* - "Union or stack mounts are specified using one of\n" - " --replace, --after, --before, --over\n" -*/ + unlock_mtab(); exit (n); } @@ -1918,18 +1911,6 @@ main(int argc, char *argv[]) { case 128: /* bind */ mounttype = MS_BIND; break; - case 129: /* replace */ - mounttype = MS_REPLACE; - break; - case 130: /* after */ - mounttype = MS_AFTER; - break; - case 131: /* before */ - mounttype = MS_BEFORE; - break; - case 132: /* over */ - mounttype = MS_OVER; - break; case 133: /* move */ mounttype = MS_MOVE; break; diff --git a/mount/mount_constants.h b/mount/mount_constants.h index dc3ca274..d877f567 100644 --- a/mount/mount_constants.h +++ b/mount/mount_constants.h @@ -22,23 +22,6 @@ #ifndef MS_DIRSYNC #define MS_DIRSYNC 128 /* Directory modifications are synchronous */ #endif - -#ifndef MS_ACTION_MASK -#define MS_ACTION_MASK 0x380 -/* Remount, but new filesystem may be different from old. Atomic - (i.e. there is no interval when nothing is mounted at the mountpoint). - If new fs differs from the old one and old is busy - -EBUSY. */ -#define MS_REPLACE 0x080 /* 128 */ -/* After, Before: as soon as we get unions these will add a new member - in the end or beginning of the chain. Fail if there is a stack - on the mountpoint. */ -#define MS_AFTER 0x100 /* 256 */ -#define MS_BEFORE 0x180 -/* Over: if nothing mounted on a mountpoint - same as if none of these -flags had been set; if we have a union with more than one element - fail; -if we have a stack or plain mount - mount atop of it, forming a stack. */ -#define MS_OVER 0x200 /* 512 */ -#endif #ifndef MS_NOATIME #define MS_NOATIME 0x400 /* 1024: Do not update access times. */ #endif