[dm-devel] [PATCH] 2.4: dm-ioctl.c: Allow slashes within device names

Kevin Corry corryk at us.ibm.com
Tue Feb 4 15:38:01 UTC 2003


Allow slashes ('/') within a DM device name, but not at the beginning.

Devfs will automatically create all necessary sub-directories if a name
with embedded slashes is registered.

diff -Naur linux-2.4.20-dm-7/drivers/md/dm-ioctl.c linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-ioctl.c
--- linux-2.4.20-dm-7/drivers/md/dm-ioctl.c	Tue Feb  4 14:28:39 2003
+++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-ioctl.c	Tue Feb  4 14:26:44 2003
@@ -549,7 +549,7 @@
 
 static int check_name(const char *name)
 {
-	if (strchr(name, '/')) {
+	if (name[0] == '/') {
 		DMWARN("invalid device name");
 		return -EINVAL;
 	}




More information about the dm-devel mailing list