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.
This commit is contained in:
parent
7a3afb563c
commit
73ac45052f
@ -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, \
|
||||
|
@ -64,7 +64,7 @@ static struct mntopt mopts[] = {
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
MOPT_SNAPSHOT,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -77,7 +77,7 @@ struct mntopt mopts[] = {
|
||||
{ "rrip", 1, ISOFSMNT_NORRIP, 1 },
|
||||
{ "joliet", 1, ISOFSMNT_NOJOLIET, 1 },
|
||||
{ "strictjoliet", 1, ISOFSMNT_BROKENJOLIET, 1 },
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
int get_ssector(const char *dev);
|
||||
|
@ -60,7 +60,7 @@ struct mntopt mopts[] = {
|
||||
MOPT_FORCE,
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static void usage(void) __dead2;
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static gid_t a_gid(char *);
|
||||
|
@ -73,7 +73,7 @@ static struct mntopt mopts[] = {
|
||||
{ "shortnames", 0, MSDOSFSMNT_SHORTNAME, 1 },
|
||||
{ "longnames", 0, MSDOSFSMNT_LONGNAME, 1 },
|
||||
{ "nowin95", 0, MSDOSFSMNT_NOWIN95, 1 },
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static gid_t a_gid(char *);
|
||||
|
@ -121,7 +121,7 @@ struct mntopt mopts[] = {
|
||||
{ "lockd", 1, ALTF_NOLOCKD, 1 },
|
||||
{ "inet4", 1, ALTF_NOINET4, 1 },
|
||||
{ "inet6", 1, ALTF_NOINET6, 1 },
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
struct nfs_args nfsdefargs = {
|
||||
|
@ -151,7 +151,7 @@ struct mntopt mopts[] = {
|
||||
{ "lockd", 1, ALTF_NOLOCKD, 1 },
|
||||
{ "inet4", 1, ALTF_NOINET4, 1 },
|
||||
{ "inet6", 1, ALTF_NOINET6, 1 },
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
struct nfs_args nfsdefargs = {
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static gid_t a_gid(char *);
|
||||
|
@ -59,7 +59,7 @@ static const char rcsid[] =
|
||||
|
||||
struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
int subdir(const char *, const char *);
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
void usage(void);
|
||||
|
@ -59,7 +59,7 @@ static const char rcsid[] =
|
||||
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static char *fsname;
|
||||
|
@ -64,7 +64,7 @@
|
||||
struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
MOPT_UPDATE,
|
||||
{ NULL, 0, 0, 0 }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
int set_charset(char **, char **, const char *);
|
||||
|
@ -61,7 +61,7 @@ struct mntopt mopts[] = {
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
MOPT_SNAPSHOT,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
void usage(void);
|
||||
|
@ -79,7 +79,7 @@ static const char rcsid[] =
|
||||
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static void usage(void) __dead2;
|
||||
|
@ -60,7 +60,7 @@ static const char rcsid[] =
|
||||
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
{ NULL }
|
||||
MOPT_NULL
|
||||
};
|
||||
|
||||
static int subdir(const char *, const char *);
|
||||
|
Loading…
Reference in New Issue
Block a user