From fe08f9d519c6453858d473f0ebedb70ab7aaa10b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 29 Dec 2003 05:55:25 -0800 Subject: [PATCH] [PATCH] name_to_dev_t() fix From: viro@parcelfarce.linux.theplanet.co.uk When we register disks, we mangle the disk names that contain slashes (e.g. cciss/c0d0) replacing them with '!' in corresponding sysfs names. So name_to_dev_t() should mangle the name in the same way before looking for it in /sys/block. --- init/do_mounts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index f688a8e48f867..51aa488d45c6f 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -130,7 +130,7 @@ fail: * Driverfs is used to check if something is a disk name - it has * all known disks under bus/block/devices. If the disk name * contains slashes, name of driverfs node has them replaced with - * dots. try_name() does the actual checks, assuming that driverfs + * bangs. try_name() does the actual checks, assuming that driverfs * is mounted on rootfs /sys. */ @@ -169,7 +169,7 @@ dev_t __init name_to_dev_t(char *name) strcpy(s, name); for (p = s; *p; p++) if (*p == '/') - *p = '.'; + *p = '!'; res = try_name(s, 0); if (res) goto done; -- 2.53.0