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

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



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)))



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