aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/check.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-04-10 00:17:20 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-17 14:24:57 -0700
commit2436f039d26a91e5404974ee0cb789b17db46168 (patch)
treeb93157b33c1c386e44b747f280cc609d22dd5b74 /fs/partitions/check.c
parent66e0a9888b774af625ce544f7c6597c7506d07db (diff)
downloadkernel_samsung_aries-2436f039d26a91e5404974ee0cb789b17db46168.zip
kernel_samsung_aries-2436f039d26a91e5404974ee0cb789b17db46168.tar.gz
kernel_samsung_aries-2436f039d26a91e5404974ee0cb789b17db46168.tar.bz2
[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 <sfr@canb.auug.org.au> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r--fs/partitions/check.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index f3b6af0..45ae7dd 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;
}