From 62d3bab5b7442b38a43792312ce0c94ab7490667 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 26 Feb 2003 15:11:57 -0800 Subject: [PATCH] [PATCH] dm: allow slashes in dm 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. [Kevin Corry] --- drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 9d8115ee747fc..322de7c4fc32b 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -545,7 +545,7 @@ static inline int get_mode(struct dm_ioctl *param) static int check_name(const char *name) { - if (strchr(name, '/')) { + if (name[0] == '/') { DMWARN("invalid device name"); return -EINVAL; } -- 2.53.0