public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use hex numbers in fs/block_dev.c
@ 2003-02-26 16:19 Rolf Eike Beer
  2003-02-26 16:37 ` Jörn Engel
  0 siblings, 1 reply; 4+ messages in thread
From: Rolf Eike Beer @ 2003-02-26 16:19 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

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

This code is used in some drivers outside fs/ too, but there only in *print*
or DEBUG's.

Eike

--- linux-2.5.63-eike/fs/block_dev.c.orig	Tue Feb 25 08:15:45 2003
+++ linux-2.5.63-eike/fs/block_dev.c	Wed Feb 26 16:04:28 2003
@@ -794,7 +794,7 @@
 	if (!name)
 		name = "unknown-block";
 
-	sprintf(buffer, "%s(%d,%d)", name, MAJOR(dev), MINOR(dev));
+	sprintf(buffer, "%s(%x:%x)", name, MAJOR(dev), MINOR(dev));
 	return buffer;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-27  0:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-26 16:19 [PATCH] Use hex numbers in fs/block_dev.c Rolf Eike Beer
2003-02-26 16:37 ` Jörn Engel
2003-02-26 17:01   ` Rolf Eike Beer
2003-02-27  0:12     ` jw schultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox