[dm-devel] [PATCH] 2.4: dm-table.c: Recognize devices names of the form "type(a,b)"

Kevin Corry corryk at us.ibm.com
Mon Mar 3 13:20:01 UTC 2003


In dm_get_device(), also look for device strings of the form:
  type(major,minor)
where major and minor are decimal (not hex). This allows table status strings
returned by DM to be fed back into DM for create or reload.

--- linux-2.4.20a/drivers/md/dm-table.c	2003/02/13 16:33:46
+++ linux-2.4.20b/drivers/md/dm-table.c	2003/03/03 19:08:54
@@ -388,6 +388,8 @@
 	if (sscanf(path, "%x:%x", &major, &minor) == 2) {
 		/* Extract the major/minor numbers */
 		dev = mk_kdev(major, minor);
+	} else if (sscanf(path, "%*s(%d,%d)", &major, &minor) == 2) {
+		dev = mk_kdev(major, minor);
 	} else {
 		/* convert the path to a device */
 		if ((r = lookup_device(path, &dev)))




More information about the dm-devel mailing list