public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RFC: /proc key naming consistency
@ 2002-02-13  2:50 Mark Swanson
  2002-02-13  5:00 ` Cameron Simpson
  2002-02-13 20:07 ` H. Peter Anvin
  0 siblings, 2 replies; 11+ messages in thread
From: Mark Swanson @ 2002-02-13  2:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Terrehon Bowden, Bodo Bauer, Jorge Nerin

I would like to hear people's opinions on making the keys in the /proc 
hierarchy consistent wrt the space character. The current Linux 
Documentation/filesystems.proc.txt does not suggest any standard naming 
conventions. F.E. cat /proc/cpuinfo 
(partial list)

cpu family      : 5
model           : 9
model name      : AMD-K6(tm) 3D+ Processor
stepping        : 1
cpu MHz         : 400.907
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no

Notice the space between "cpu" and "MHz", or "cpu" and "family" yet there is 
no space between "fdiv" and "bug" (_).

The reason I think NOT using a space is a good idea because it makes life 
easier for developers parsing /proc entries. Specifically, Java developers 
could use /proc/cpuinfo as a property file, but the space in the 'key' breaks 
java.util.Properties.load(). 

Fire away...

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: RFC: /proc key naming consistency
@ 2002-02-13 23:31 Luke Burton
  2002-02-14 12:19 ` Miquel van Smoorenburg
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Luke Burton @ 2002-02-13 23:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: phillips


> What do you think about the idea earlier in this thread of going with
> shell-parsable key value pairs?  I find that idea really attractive,
> but there's the issue of breaking utilities (kde control panel?) that
> already parse the existing format.

Shell parseable /proc/* entries would be so much more elegant to deal with
compared to the old system. I would guess that maintainers for things like
KDE would jump at the opportunity to decrease the complexity of their
code.

A compatibility mode might be useful. Either a straight config option, or
perhaps something more sophisticated. Idea: perhaps proc functions
installed with create_proc_read_entry could, rather than just write
strings to buffers, return a list of key/value pairs which is rendered in
some configurable format by a new function, like "proc_render_values".
proc_render_values could use a column format like it does now, or a shell
parseable foo=blah\n format.

Or even XML. Ouch! No need to throw things at me!

Regards,

Luke.

-- 

Ash OS durbatulk, ash OS gimbatul,
Ash OS thrakatulk, agh burzum-ishi krimpatul!
Uzg-Microsoft-ishi amal fauthut burguuli.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-02-14 16:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-13  2:50 RFC: /proc key naming consistency Mark Swanson
2002-02-13  5:00 ` Cameron Simpson
2002-02-13 20:07 ` H. Peter Anvin
2002-02-13 20:52   ` Daniel Phillips
2002-02-13 21:04     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2002-02-13 23:31 Luke Burton
2002-02-14 12:19 ` Miquel van Smoorenburg
2002-02-14 12:25   ` Wichert Akkerman
2002-02-14 16:09 ` Vince Weaver
2002-02-14 19:02 ` ertzog
2002-02-14 16:12   ` Alexander Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox