svn commit: r236554 - projects/pf/head/sys/contrib/pf/net

Robert Watson rwatson at FreeBSD.org
Sun Jun 10 13:46:10 UTC 2012


On Tue, 5 Jun 2012, Bruce Evans wrote:

>> B> Many still have spaces in them.  This breaks at least simple parsing
>> B> of "vmstat -m" output using columns in awk (and postprocessing of
>> B> vmstat -m output is more needed than orginally, since vmstat is now
>> B> too stupid to even print the totals).  A few bugs in this area have
>> B> been fixed relatively recently.  For example:
>> B>
>> B>    file desc -> filedesc   (matches original naming scheme -- no 
>> underscore)
>> B>    BIO buffer -> biobuf
>> B>    UFS mount -> ufs_mount  (now just a style bug -- underscore)
>> B>    VM pgdata -> vm_pgdata
>> B>    * ihash -> [went away]
>> B>    struct cdev * -> [went away]
>> B>    cluster_save buffer -> [went away]  (was also too long)
>> B>    [too many] -> [vmstat -z, with worse names and formatting]
>> 
>> Should only the shortdesc not contain spaces? Well, there is conflict 
>> between parseability and understandability :)
>
> Of course the longdesc should contain spaces.  Especially since it is not 
> used, so it only bloats the source code :-).
>
> The shortdesc could even use M_FOO (if the longdesc could be looked up more 
> easily).  But in 4.4BSD, there was a separate (hard-coded) string table with 
> names, with lots of spaces in it too, but apparently only for newer (in 
> 1993) names, since entries 1-21 had no spaces, no underscores, many 
> abbreviations and no upper case, while entries 22-61 are quite different.

If we succeed in getting this fixed (again) then we should add an assertion to 
the malloc and UMA registration routines to panic() if a space is found in a 
short name.

Robert


More information about the svn-src-projects mailing list