[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]