Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2005 12:37:13 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c
Message-ID:  <200504081237.17789.jhb@FreeBSD.org>
In-Reply-To: <19069.1112973882@critter.freebsd.dk>
References:  <19069.1112973882@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 08 April 2005 11:24 am, Poul-Henning Kamp wrote:
> In message <20050409002141.V48108@delplex.bde.org>, Bruce Evans writes:
> >On Fri, 8 Apr 2005, Gleb Smirnoff wrote:
> >> glebius     2005-04-08 14:14:09 UTC
> >>
> >>  FreeBSD src repository
> >>
> >>  Modified files:
> >>    sys/kern             kern_mutex.c
> >>  Log:
> >>  Add additional newline to debug.mutex.prof.stats header, so that
> >>  column names are printed exactly above the columns.
> >
> >This is bogus, as is the existence of sysctls that format data (*).
> >
> >(*) Formatted output is not too bad for sysctls in the debug tree, but
> >for general-purpose sysctls it is just a bug.
>
> I disagree.

It's a lot easier to parse a structured binary blob than to parse formatted 
text so that you can display it differently.  Note that I would consider XML 
ala GEOM to be more of the blob style since the whitespace isn't significant.  
It should be up to userland to do whatever formatting of data is required.  
For small things like 'current timecounter' or 'list of valid CPU 
frequencies' simple strings with space delimiting is probably fine though.  
Trying to format complex data into multiple lines with columns and headers 
doesn't belong in the kernel outside of ddb IMO.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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