[lkml]   [2000]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: What /proc should contain [was: /proc/driver/microcode]
On Mon, 28 Feb 2000, Patrick Spinler wrote:
> Preface this with the obligatory "I am not a kernel hacker. If this
> message is stupid, just ignore me."

No, it's worth discussing.

> Regarding parsing /proc files, has anyone thought of a file format which
> contains a parsing specification ? For example a scanf format string.
> Eg:
> $ cat /proc/somefile
> %d %d %f %s
> 12 45 8.4 Some String

If the data are to be self-describing then we also need to know what each
one is. So:

$ cat /proc/somefile
rate limit average eventname
%d %d %f %s
12 45 8.4 Some String

But now look at that first line. Those tags must be fixed text or we get
all the same old respelling problems. So why didn't we just have

$ cat /proc/something/rate
$ cat /proc/something/limit
$ cat /proc/something/average
$ cat /proc/something/eventname
Some String

I had to know that rate, limit, and average are numbers, and average is a
float, and eventname is a string, in order to use them, so now the formats
are irrelevant.

Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
"Where's the kaboom? There was supposed to be an Earth-shattering kaboom!"
-- Marvin Martian, 01/01/2000 00:00:00

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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