lkml.org 
[lkml]   [2003]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use hex numbers in fs/block_dev.c
On Wed, Feb 26, 2003 at 06:01:55PM +0100, Rolf Eike Beer wrote:
> Am Mittwoch, 26. Februar 2003 17:37 schrieb Jörn Engel:
> > On Wed, 26 February 2003 17:19:15 +0100, Rolf Eike Beer wrote:
> > > We're using hex numbers to identify devices in most places. We should use
> > > them in filesystem messages, errors etc. too, this would be much more
> > > consistent and avoids things like this where two different naming styles
> > > for the same error are used:
> > >
> > > end_request: [...] dev 16:45 (hdd), sector 9175248
> > > EXT3-fs error (device ide1(22,69)): [...] inode=575269,
> > > block=1146906
> > >
> > > With this patch the second message would look like this:
> > >
> > > EXT3-fs error (device ide1(16:45)): [...] inode=575269,
> > > block=1146906
> >
> > Whis is _horrible_. Am I supposed to guess that ide does not use major
> > 16, so it will be 0x16 == 22 instead?
>
> Of course, I know. But then we have to fix the end_request stuff also. And
> root=831 command line etc. This _is_ ugly. I just tried to make it one kind
> of ugly at all.

If you are going to print it in hex do make it clear but one
0x should be enough: 0x16:45 is OK, 0x16:0x45 is hideous.

Given that the way i would identify device would be to grep
for the numbers in an ls of /dev i'd much rather they be in
decimal. It all depends on how people will use the values.
When would i use the hex representation be useful?

--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws

Remember Cernan and Schmitt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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