From: Stephen Rothwell Date: Mon, 10 Apr 2006 07:17:20 +0000 (-0700) Subject: [PATCH] Fix block device symlink name X-Git-Tag: v2.6.17-rc2~20^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2436f039d26a91e5404974ee0cb789b17db46168;p=linux-2.6-omap-h63xx.git [PATCH] Fix block device symlink name As noted further on the this file, some block devices have a / in their name, so fix the "block:..." symlink name the same as the /sys/block name. Signed-off-by: Stephen Rothwell Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/partitions/check.c b/fs/partitions/check.c index f3b6af07172..45ae7dd3c65 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -372,6 +372,7 @@ static char *make_block_name(struct gendisk *disk) char *name; static char *block_str = "block:"; int size; + char *s; size = strlen(block_str) + strlen(disk->disk_name) + 1; name = kmalloc(size, GFP_KERNEL); @@ -379,6 +380,10 @@ static char *make_block_name(struct gendisk *disk) return NULL; strcpy(name, block_str); strcat(name, disk->disk_name); + /* ewww... some of these buggers have / in name... */ + s = strchr(name, '/'); + if (s) + *s = '!'; return name; }