[lkml]   [2001]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Yet another design for /proc. Or actually /kernel.
At 3:13 PM -0600 11/7/01, Brenneke, Matthew Jeffrey (UMR-Student) 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.
>>Actually, /proc/mounts is currently broken, and is an excellent
>>example of why the above statement simply isn't true unless you apply
>>another level of indirection: try mounting something on a directory
>>the name of which contains whitespace in any form (remember, depending
>>on your setup this may be doable by an unprivileged user...)

If [tag plus] multiple values are allowed on a line, the field
separation needs to be unambiguous. So quoting/escaping is required
in some cases. Spaces are common enough in a value that white space
maybe doesn't make a very good field separator.

Or just quote all strings (and escape quotes). Interpret values as C
would, 0x for hex, "... for strings, and so on for floating point,
octal, &c. Heck, you could even have typing (3UL) or casts, though
that's probably going too far.
/Jonathan Lundell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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