[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PROPOSAL: dot-proc interface [was: /proc stuff]
On Mon Nov 05, 2001 at 11:51:52PM +0100, Tim Jansen wrote:
> On Monday 05 November 2001 22:58, Ben Greear wrote:
> > So if BNF makes it harder for shell scripts and sscanf, and harder for
> > the kernel developers...what good does it do???
> You know how to parse the file.
> Take a look at /proc/partitions. Is its exact syntax obvious without
> examining the source in the kernel? Can it happen that there is a space or
> another unusual character in the device path and what happens then? Could it

Come now, it really isn't that difficult:

char name[80];
unsigned long long size;
unsigned int major, minor;

if (sscanf(line, "%4u %4u %llu %s", &major, &minor, &size, name) == 4)
add_partition(name, size, major, minor);


Erik B. Andersen
--This message was written using 73% post-consumer electrons--
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:1.454 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site