From owner-svn-src-projects@FreeBSD.ORG Sun Jun 10 13:46:10 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA20B1065674; Sun, 10 Jun 2012 13:46:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBD58FC0C; Sun, 10 Jun 2012 13:46:10 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id CB04346B20; Sun, 10 Jun 2012 09:46:09 -0400 (EDT) Date: Sun, 10 Jun 2012 14:46:09 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Evans In-Reply-To: <20120605000211.R1992@besplex.bde.org> Message-ID: References: <201206041009.q54A9v4A019437@svn.freebsd.org> <20120604210548.Y1459@besplex.bde.org> <20120604133358.GO44607@FreeBSD.org> <20120605000211.R1992@besplex.bde.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-projects@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r236554 - projects/pf/head/sys/contrib/pf/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2012 13:46:10 -0000 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