From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Andrew Morton <akpm@osdl.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/5] Fix block device symlink name
Date: Mon, 17 Apr 2006 14:33:36 -0700 [thread overview]
Message-ID: <11453096192835-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11453096194144-git-send-email-greg@kroah.com>
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 files changed, 5 insertions(+), 0 deletions(-)
2436f039d26a91e5404974ee0cb789b17db46168
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 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);
@@ -379,6 +380,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;
}
--
1.2.6
next prev parent reply other threads:[~2006-04-17 21:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-17 21:29 [GIT PATCH] Fixes in the -stable tree, but not in mainline Greg KH
2006-04-17 21:33 ` [PATCH 1/5] isd200: limit to BLK_DEV_IDE Greg KH
2006-04-17 21:33 ` Greg KH [this message]
2006-04-17 21:33 ` [PATCH 3/5] ext3: Fix missed mutex unlock Greg KH
2006-04-17 21:33 ` [PATCH 4/5] cciss: bug fix for crash when running hpacucli Greg KH
2006-04-17 21:33 ` [PATCH 5/5] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524) Greg KH
2006-04-18 16:06 ` [GIT PATCH] Fixes in the -stable tree, but not in mainline Theodore Ts'o
2006-04-18 17:42 ` Greg KH
2006-04-18 20:39 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11453096192835-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.