summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-06-01 09:39:36 +0000
committerdelphij <delphij@FreeBSD.org>2005-06-01 09:39:36 +0000
commitee88062325db2da9b1741e828e867ec86a327522 (patch)
tree4c7df792f9460a2623bdeb425db125d58aaff586 /sbin/mount
parent0ea9202ca779a70dcc7372523f417131b5faa684 (diff)
downloadFreeBSD-src-ee88062325db2da9b1741e828e867ec86a327522.zip
FreeBSD-src-ee88062325db2da9b1741e828e867ec86a327522.tar.gz
Add a handy macro to represent null mount option, MOPT_NULL, and make
use of the macro in sbin/mount*'s, by replacing: mopts[] = { MOPT_STDOPTS, { NULL } } With: mopts[] = { MOPT_STDOPTS, MOPT_NULL } This change will help to reduce the situation that we don't explicitly initialize "struct mntopt"'s. It should not contribute to any functional/logical changes as far as I can tell.
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mntopts.h3
-rw-r--r--sbin/mount/mount_ufs.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h
index 5205195..8b8e1fb 100644
--- a/sbin/mount/mntopts.h
+++ b/sbin/mount/mntopts.h
@@ -65,6 +65,9 @@ struct mntopt {
/* This is parsed by mount(8), but is ignored by specific mount_*(8)s. */
#define MOPT_AUTO { "auto", 0, 0, 0 }
+/* A handy macro as terminator of MNT_ array */
+#define MOPT_NULL { NULL, 0, 0, 0 }
+
#define MOPT_FSTAB_COMPAT \
MOPT_RO, \
MOPT_RW, \
diff --git a/sbin/mount/mount_ufs.c b/sbin/mount/mount_ufs.c
index ff1c126..e18247b 100644
--- a/sbin/mount/mount_ufs.c
+++ b/sbin/mount/mount_ufs.c
@@ -64,7 +64,7 @@ static struct mntopt mopts[] = {
MOPT_SYNC,
MOPT_UPDATE,
MOPT_SNAPSHOT,
- { NULL }
+ MOPT_NULL
};
int
OpenPOWER on IntegriCloud