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 <kzak@redhat.com>
stable/v2.20
Karel Zak 15 years ago
parent 934238cd25
commit 2e71f7ad58
  1. 25
      mount/mount.c
  2. 17
      mount/mount_constants.h

@ -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;

@ -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

Loading…
Cancel
Save