[PATCH RFC] Add a macro for null mount options to sbin/mount*

Maxime Henrion mux at FreeBSD.org
Wed Jun 1 02:17:35 PDT 2005


Xin LI wrote:
> Hi, -arch@,
> 
> In our mount* utilities, the null mount option, which is usually be used
> as a terminator of an option vector, is defined with some hand-rolled
> terms, e.g.: {NULL}, {NULL, 0, 0, 0}, etc.
> 
> I think it would be nice to have a new macro to deal with this, say,
> MOPT_NULL, which would be extended to {NULL, 0, 0, 0}, which can act as
> an explicit initialize.  And in my opinion, something like:
> 
> %%%
> opt = {
> 	MOPT_STD,
> 	MOPT_NULL
> };
> %%%
> 
> Looks better than:
> 
> %%%
> opt = {
> 	MOPT_STD,
> 	{ NULL }
> };
> %%%
> 
> That has lead to the attached patchset.  May I go ahead and commit it?

This is definitely nice.  Please commit!

Cheers,
Maxime


More information about the freebsd-arch mailing list