| From stable-bounces@linux.kernel.org Mon Apr 10 01:18:42 2006 |
| Message-Id: <200604100817.k3A8Hvcu001424@shell0.pdx.osdl.net> |
| To: sfr@canb.auug.org.au, hch@lst.de, stable@kernel.org, |
| viro@zeniv.linux.org.uk, mm-commits@vger.kernel.org |
| From: akpm@osdl.org |
| Date: Mon, 10 Apr 2006 00:17:20 -0700 |
| Cc: |
| Subject: Fix block device symlink name |
| |
| |
| From: Stephen Rothwell <sfr@canb.auug.org.au> |
| |
| 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> |
| |
| |
| --- |
| fs/partitions/check.c | 5 +++++ |
| 1 file changed, 5 insertions(+) |
| |
| --- linux-2.6.16.5.orig/fs/partitions/check.c |
| +++ linux-2.6.16.5/fs/partitions/check.c |
| @@ -345,6 +345,7 @@ static char *make_block_name(struct gend |
| 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); |
| @@ -352,6 +353,10 @@ static char *make_block_name(struct gend |
| 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; |
| } |
| |