The changes for adding the "noauto" option were mostly wrong. MNT_NOAUTO
is a kernel flag, and the kernel definately doesn't need to know about it.
This commit is contained in:
parent
b87f24347c
commit
d28bf0579f
@ -42,7 +42,7 @@ struct mntopt {
|
||||
|
||||
/* User-visible MNT_ flags. */
|
||||
#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 }
|
||||
#define MOPT_NOAUTO { "auto", 1, MNT_NOAUTO, 0 }
|
||||
#define MOPT_NOAUTO { "auto", 1, 0, 0 }
|
||||
#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 }
|
||||
#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 }
|
||||
#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 }
|
||||
|
@ -108,11 +108,6 @@ The same as
|
||||
forces the revocation of write access when trying to downgrade
|
||||
a filesystem mount status from read-write to read-only. Also
|
||||
forces the R/W mount of an unclean filesystem (dangerous; use with caution).
|
||||
.It noauto
|
||||
Do not attempt to mount this filesystem when the
|
||||
.Fl a
|
||||
flag is specified. This allows you to have mount entries that can
|
||||
be invoked manually when needed, but not before.
|
||||
.It nodev
|
||||
Do not interpret character or block special devices on the file system.
|
||||
This option is useful for a server that has file systems containing
|
||||
|
@ -84,7 +84,6 @@ static struct opt {
|
||||
{ MNT_ASYNC, "asynchronous" },
|
||||
{ MNT_EXPORTED, "NFS exported" },
|
||||
{ MNT_LOCAL, "local" },
|
||||
{ MNT_NOAUTO, "noauto" },
|
||||
{ MNT_NODEV, "nodev" },
|
||||
{ MNT_NOEXEC, "noexec" },
|
||||
{ MNT_NOSUID, "nosuid" },
|
||||
@ -167,12 +166,12 @@ main(argc, argv)
|
||||
continue;
|
||||
if (badvfsname(fs->fs_vfstype, vfslist))
|
||||
continue;
|
||||
if (!strstr(fs->fs_mntops, "noauto")) {
|
||||
if (strstr(fs->fs_mntops, "noauto"))
|
||||
continue;
|
||||
if (mountfs(fs->fs_vfstype, fs->fs_spec,
|
||||
fs->fs_file, init_flags, options,
|
||||
fs->fs_mntops))
|
||||
fs->fs_file, init_flags, options,
|
||||
fs->fs_mntops))
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0)
|
||||
|
@ -42,7 +42,7 @@ struct mntopt {
|
||||
|
||||
/* User-visible MNT_ flags. */
|
||||
#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 }
|
||||
#define MOPT_NOAUTO { "auto", 1, MNT_NOAUTO, 0 }
|
||||
#define MOPT_NOAUTO { "auto", 1, 0, 0 }
|
||||
#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 }
|
||||
#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 }
|
||||
#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 }
|
||||
|
@ -108,11 +108,6 @@ The same as
|
||||
forces the revocation of write access when trying to downgrade
|
||||
a filesystem mount status from read-write to read-only. Also
|
||||
forces the R/W mount of an unclean filesystem (dangerous; use with caution).
|
||||
.It noauto
|
||||
Do not attempt to mount this filesystem when the
|
||||
.Fl a
|
||||
flag is specified. This allows you to have mount entries that can
|
||||
be invoked manually when needed, but not before.
|
||||
.It nodev
|
||||
Do not interpret character or block special devices on the file system.
|
||||
This option is useful for a server that has file systems containing
|
||||
|
@ -84,7 +84,6 @@ static struct opt {
|
||||
{ MNT_ASYNC, "asynchronous" },
|
||||
{ MNT_EXPORTED, "NFS exported" },
|
||||
{ MNT_LOCAL, "local" },
|
||||
{ MNT_NOAUTO, "noauto" },
|
||||
{ MNT_NODEV, "nodev" },
|
||||
{ MNT_NOEXEC, "noexec" },
|
||||
{ MNT_NOSUID, "nosuid" },
|
||||
@ -167,12 +166,12 @@ main(argc, argv)
|
||||
continue;
|
||||
if (badvfsname(fs->fs_vfstype, vfslist))
|
||||
continue;
|
||||
if (!strstr(fs->fs_mntops, "noauto")) {
|
||||
if (strstr(fs->fs_mntops, "noauto"))
|
||||
continue;
|
||||
if (mountfs(fs->fs_vfstype, fs->fs_spec,
|
||||
fs->fs_file, init_flags, options,
|
||||
fs->fs_mntops))
|
||||
fs->fs_file, init_flags, options,
|
||||
fs->fs_mntops))
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user