Re: PROPOSAL: /proc standards (was dot-proc interface [was: /proc

From: Erik Hensema (spamtrap@use.reply-to)
Date: Tue Nov 06 2001 - 16:31:04 EST


William Knop (w_knop@hotmail.com) wrote:
>>>1) IT SHOULD NOT BE PRETTY. No tabs to line up columns. No "progress
>>>bars." No labels except as "proc comments" (see later). No in-line
>>>labelling.
>>
>>It should not be pretty TO HUMANS. Slight difference. It should be >pretty
>>to shellscripts and other applications though.
>
>If this is the case, why are we using ASCII for everything? If the only
>interface to /proc will be applications, then we could just as well let the
>application turn four bytes into an ASCII IPv4 adddress. We could easily
>have it set up to parse using the format [single byte type identifier (ie 4
>for string with the first byte of "data" being the string length, 1 for
>unsigned int, 2 for signed int, 19 for IPv4, 116 for progress bar,
>etc.)][data]. Let people standardize away. Am I missing the point?

ASCII is readable by all languages with little programmer effort. In C, you
can use a simple scanf, Perl and shells like plain ascii best.

When /proc is turned into some binary interface we'd need to create little
programs which read the binary values from the files and output them on
their stdout, which is quite cumbersome, IMHO.

>I think every aspect of an OS should be intuitive (so long as it is
>efficient), which IMO /proc isn't. If this means splitting it in two, as
>some have suggested, so be it. It certainly should have a design
>guideline/spec so we may at least be consistant. Just my 2 coppers.

Yes, maintain compatibility for 2.6 and try to dump it for 2.8.

Heck, 95% compatibility could even be achieved using a 100% userspace app
which serves the data over named pipes.

-- 
Erik Hensema (erik@hensema.net)
I'm on the list; no need to Cc: me, though I appreciate one if your mailer
doesn't support the References header.
-
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:32 EST