Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2012 14:46:09 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-projects@freebsd.org, Gleb Smirnoff <glebius@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r236554 - projects/pf/head/sys/contrib/pf/net
Message-ID:  <alpine.BSF.2.00.1206101445320.33500@fledge.watson.org>
In-Reply-To: <20120605000211.R1992@besplex.bde.org>
References:  <201206041009.q54A9v4A019437@svn.freebsd.org> <20120604210548.Y1459@besplex.bde.org> <20120604133358.GO44607@FreeBSD.org> <20120605000211.R1992@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1206101445320.33500>