Re: Suggested dual human/binary interface for proc/devfs

From: Richard Gooch (rgooch@ras.ucalgary.ca)
Date: Tue Apr 04 2000 - 13:43:04 EST


Manuel Estrada writes:
>
> Hello, I am no kernel expert, but for some time an idea has
> been floating in my mind since I read someone criticizing proc for
> being human readable and time consuming to read by top or any other
> program.
>
> Well, what about having a human interface for humans and a
> binary interface for programs, using some flag to to open (2) to
> select it, something which wouldn't have a meaning within those files,
> the perfect one would be something like O_BINARY, which also wouldn't
> have any meaning otherwise, but that one doesn't exist. Then maybe
> O_LARGEFILE, O_SYNC, O_TRUNC, O_APPEND... Well, I don't realy know if
> this are good candidates.
>
> And also, not all files would need the dual interface, the
> opening program should know if a certain file supported it and also
> the format of the interface.

Have a look at the MTRR driver: arch/i386/kernel/mtrr.c

We don't need another flag to open(2). Just make read(2) provide
human-readable data, and ioctl(2) computer-readable data.

                                        Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:12 EST