Re: Yet another design for /proc. Or actually /kernel.

From: H. Peter Anvin (hpa@zytor.com)
Date: Wed Nov 07 2001 - 19:32:12 EST


antirez wrote:

> On Wed, Nov 07, 2001 at 03:13:25PM -0600, Brenneke, Matthew Jeffrey (UMR-Student) wrote:
>
>>/dev/hda1 /home/mbrennek/stuff\040and vfat rw 0 0
>>
> [snip]
>
>>Are you refering to the 040?
>>
>
> This works but, if /proc will really be replaced, another
> idea can be to organize the stuff to get something of more
> coherent than:
>
> value1a value1b value1c
> value2a value2b value2c
>
> that's more human readable than machine parsable.
> Something that can fix both the problems (quoting and format) is
> the following:
>
> put every string inside () and only quotes ( and ) with \
> and quotes \ itself with \\, than use brackets to delimit
> string _and_ provide information about the format:
>
> ((dev/hda1)(/home/mbrennek/stuff and)(vfat)(rw)(0)(0))
> ((/dev/hda2)(/var/tmp)(ext2)(rw)(0)(0))
>
> and so on. With a simple parser you get a safe delimiter
> for a single element and you know that there are two "objects"
> of 6 elements.
>

You still need quoting, so why on earth does this make it easier to parse?
 It doesn't; it just makes it harder to read for humans.

        -hpa

-
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/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:37 EST