From 89beb278f76d140430e3bd2fdf64fea6f68da491 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sat, 26 Aug 1995 05:39:53 +0000 Subject: [PATCH] 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. --- sbin/mount/mntopts.h | 2 +- sbin/mount/mount.8 | 5 ----- sbin/mount/mount.c | 9 ++++----- sbin/mount_ifs/mntopts.h | 2 +- sbin/mount_ifs/mount.8 | 5 ----- sbin/mount_ifs/mount.c | 9 ++++----- 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h index 84e294360514..710b557e61a3 100644 --- a/sbin/mount/mntopts.h +++ b/sbin/mount/mntopts.h @@ -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 } diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 29a675dd134c..7be6e1358a71 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -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 diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index bcf65a3430cb..cf05d3fa4a23 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -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) diff --git a/sbin/mount_ifs/mntopts.h b/sbin/mount_ifs/mntopts.h index 84e294360514..710b557e61a3 100644 --- a/sbin/mount_ifs/mntopts.h +++ b/sbin/mount_ifs/mntopts.h @@ -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 } diff --git a/sbin/mount_ifs/mount.8 b/sbin/mount_ifs/mount.8 index 29a675dd134c..7be6e1358a71 100644 --- a/sbin/mount_ifs/mount.8 +++ b/sbin/mount_ifs/mount.8 @@ -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 diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index bcf65a3430cb..cf05d3fa4a23 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -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)