lkml.org 
[lkml]   [2001]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Yet another design for /proc. Or actually /kernel.
On Wed, Nov 07, 2001 at 02:42:48PM -0500, Daniel R. Warner wrote:
> Erik Hensema wrote:
>
> > - Multiple values per file when needed
> > A file is a two dimensional array: it has lines and every line
> > can consist of multiple fields.
> > A good example of this is the current /proc/mounts.
> > This can be parsed very easily in all languages.
>
>
> > No need for single-value files, that's oversimplification.
> <snip>
>
>
> This is fine for reading, but it makes it harder for humans to change
> values in /proc - eg, echo 0 > /proc/sys/net/ipv4/tcp_ecn
>

'Multiple value' files can be made easy to 'write'. The only
requirement is each 'field' in the file have a unique label. Then
it's a common associative array, requiring some generic filesystem
write magic to handle the input:

echo "label:1" > /proc/...

The 'generic write magic' would require (at least, without even
more magic) that all /proc files conform to the schema. This is
probably a _good_ thing.

--
Allen Campbell | Lurking at the bottom of the
allenc@verinet.com | gravity well, getting old.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.064 / U:4.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site