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

Bruce Evans bde at zeta.org.au
Wed Jun 1 18:49:08 PDT 2005


On Wed, 1 Jun 2005, Xin LI wrote:

> On Wed, Jun 01, 2005 at 09:23:23PM +1000, Bruce Evans wrote:
>>
>> MOPT_NULL is a poor name.  It is not a null option, but a terminator that
>> happens to have nulls in it.
>
> Agreed...  Will the patch found in attachment look better?  It also
> updates the manpage.

The name is OK now, but see other replies about the changes obfuscating
the terminating condition.

% Index: mount/mntopts.h
% ===================================================================
% RCS file: /home/ncvs/src/sbin/mount/mntopts.h,v
% retrieving revision 1.25
% diff -u -r1.25 mntopts.h
% --- mount/mntopts.h	1 Jun 2005 09:39:34 -0000	1.25
% +++ mount/mntopts.h	1 Jun 2005 13:35:57 -0000
% @@ -66,7 +66,7 @@
%  #define MOPT_AUTO		{ "auto",	0, 0, 0 }
% 
%  /* A handy macro as terminator of MNT_ array */

The previous patch also has some style bugs.  I noticed mainly the missing
sentence (fragment) termination here.  All other sentence (fragment)s in
comments in this file except ones to the right of code are terminated
normally.

Bruce


More information about the freebsd-arch mailing list