aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-08-19 17:09:58 +0000
committerWarner Losh <imp@FreeBSD.org>2020-08-19 17:09:58 +0000
commit08b242aeeed2108767072265833997d1b6ec2098 (patch)
treed369b65ed5bf908e7a669e1a109681aa3f88cd2d /sbin
parent7eee1720520faaeee2dd91f23092b39f83b89216 (diff)
downloadsrc-08b242aeeed2108767072265833997d1b6ec2098.tar.gz
src-08b242aeeed2108767072265833997d1b6ec2098.zip
Move the mount name to bit mapping into sys/mount.h so it can be shared with the
kernel. Discussed with: kib@ Reviewed by: kirk@ (prior version) Sponsored by: Netflix Diffential Revision: https://reviews.freebsd.org/D25969
Notes
Notes: svn path=/head/; revision=364401
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount/mount.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index e9424c4eb413..fad999c97dc9 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95";
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#define _WANT_MNTOPTNAMES
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -92,36 +93,8 @@ void usage(void);
char *flags2opts(int);
/* Map from mount options to printable formats. */
-static struct opt {
- uint64_t o_opt;
- const char *o_name;
-} optnames[] = {
- { MNT_ASYNC, "asynchronous" },
- { MNT_EXPORTED, "NFS exported" },
- { MNT_LOCAL, "local" },
- { MNT_NOATIME, "noatime" },
- { MNT_NOEXEC, "noexec" },
- { MNT_NOSUID, "nosuid" },
- { MNT_NOSYMFOLLOW, "nosymfollow" },
- { MNT_QUOTA, "with quotas" },
- { MNT_RDONLY, "read-only" },
- { MNT_SYNCHRONOUS, "synchronous" },
- { MNT_UNION, "union" },
- { MNT_NOCLUSTERR, "noclusterr" },
- { MNT_NOCLUSTERW, "noclusterw" },
- { MNT_SUIDDIR, "suiddir" },
- { MNT_SOFTDEP, "soft-updates" },
- { MNT_SUJ, "journaled soft-updates" },
- { MNT_MULTILABEL, "multilabel" },
- { MNT_ACLS, "acls" },
- { MNT_NFS4ACLS, "nfsv4acls" },
- { MNT_GJOURNAL, "gjournal" },
- { MNT_AUTOMOUNTED, "automounted" },
- { MNT_VERIFIED, "verified" },
- { MNT_UNTRUSTED, "untrusted" },
- { MNT_NOCOVER, "nocover" },
- { MNT_EMPTYDIR, "emptydir" },
- { 0, NULL }
+static struct mntoptnames optnames[] = {
+ MNTOPT_NAMES
};
/*
@@ -664,7 +637,7 @@ prmount(struct statfs *sfp)
{
uint64_t flags;
unsigned int i;
- struct opt *o;
+ struct mntoptnames *o;
struct passwd *pw;
(void)printf("%s on %s (%s", sfp->f_mntfromname, sfp->f_mntonname,