Re: Patch to fix /proc/net files.

Richard B. Johnson (root@chaos.analogic.com)
Wed, 28 Oct 1998 12:42:47 -0500 (EST)


On Wed, 28 Oct 1998, Vojtech Pavlik wrote:

> On Wed, Oct 28, 1998 at 01:10:24PM +0000, Alan Cox wrote:
> > > This patch should convert /proc/net/{raw,tcp,udp} so that the various
> > > IP addresses therein are shown in dotted quad format rather than in
> > > little-endian hex integers.
> >
> > Changing the format is an even worse idea
>
> * Changing the format is a bad idea.
> * Leaving things as they are is a bad idea.
> * Just changing the endianity is a bad idea.
>
> Hmm, is there anything else to do except going with a bad idea then?
>
> Vojtech Pavlik
>
If the format of /proc gets changed, perhaps it's time to put
a FORMAT file in each subdirectory. Such a file would contain
standardized information about the formats to be used when
reading the files in each directory. Once all the utilities
were redone (again), they would not have to ever be changed
again. Such a format file might contain information like:

devices %s
locks %s%s%s%d%d:%d:%d%d%lu:0x8x:0x8x:....etc
|________ file name |______ format

i.e., the format that sscanf() or whatever would used to get
the correct information into the correct size/type for a
particular machine.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.126 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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