lkml.org 
[lkml]   [1998]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: ARMS WAVING!!! Proposal to fix /proc dainbrammage.
Date
> 
> No, we really want to use dot-format for internet addresses, and decimal
> numbers for port numbers etc. /proc should really be the format humans
> use: whenever you even have a _question_ of what the number means, it's
> wrong.
>
> So both "7f000001:0400" and "0100007f:0004" are wrong, "127.0.0.1:1024"
> is right.

I concur. I think that for things like IP addresses, using a custom formatting
routine in the kernel (take raw:bigendian and spit out a pretty string) makes
sense, for that matter, anything that has a conventional representation should
be properly formatted (device numbers, MAC addresses, memory offsets, etc). For
other numbers where it makes sense for them to be Hex, make them big endian.
For places where it makes sense for Binary to be the representation, do that.

I can write a base set of routines that can en/decode Binary, Hex, and Time
values, so existing implementations would not need to reimplement these
things.

But on top of that, I think that standardizing on Big endian formatted data
is something we should do. Just to set a common baseline that the generic
formatting routines can take (convert to big endian before passing to routine).

>
> Yes, its a bit harder to parse for computers, but hey, that's what
> computers are good at.
>
> > Time formats:
> >
> > It seems to me that expressing the time constants in /proc would be
> > as simple as:
> >
> > <seconds>.<microseconds>
>
> Yes. Some of the stuff already does this (not microseconds, but look at
> "uptime" for example.

Noted, however this is only accurate to 1/100th of a second. I would rather
be timeval compliant, as things like TCP timestamps and such utilize this.
If we change the format, we should make everything compliant, even uptime.
This just paves the way for not having to do it again in the future (I want
microsecond precision cause I've got an Alpha/Just leave it as is and do
some f'd up kludge).

>
> Linus
>

--Perry

--
Perry Harrington Linux rules all OSes. APSoft ()
email: perry@apsoft.com Think Blue. /\

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

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