
From: Christoph Hellwig <hch@lst.de>

disk_name() (and hence bdevname()) are now returning devfs-style device names
when devfs is enabled.

This is nice, but these names are very long, and they overflow the 32-char
buffers which these functions use.

The choices are:

a) Use a bigger buffer (increase BDEVNAME_SIZE).

   This might be practical.  But how big?

b) return the name in kmalloced memory, make caller free it up.   Yuk.

c) Add a print_bdevname() thing and intersperse that amongst the printk's.
   This would work.

d) Just print the non-devfs device name.   That's what this patch does.


 fs/partitions/check.c |   13 -------------
 1 files changed, 13 deletions(-)

diff -puN fs/partitions/check.c~disk_name-no-devfs fs/partitions/check.c
--- 25/fs/partitions/check.c~disk_name-no-devfs	2003-05-02 02:11:04.000000000 -0700
+++ 25-akpm/fs/partitions/check.c	2003-05-02 02:11:04.000000000 -0700
@@ -96,19 +96,6 @@ static int (*check_part[])(struct parsed
 
 char *disk_name(struct gendisk *hd, int part, char *buf)
 {
-#ifdef CONFIG_DEVFS_FS
-	if (hd->devfs_name[0] != '\0') {
-		if (part)
-			snprintf(buf, BDEVNAME_SIZE, "%s/part%d",
-					hd->devfs_name, part);
-		else if (hd->minors != 1)
-			snprintf(buf, BDEVNAME_SIZE, "%s/disc", hd->devfs_name);
-		else
-			snprintf(buf, BDEVNAME_SIZE, "%s", hd->devfs_name);
-		return buf;
-	}
-#endif
-
 	if (!part)
 		snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name);
 	else if (isdigit(hd->disk_name[strlen(hd->disk_name)-1]))

_
