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

[dm-devel] [PATCH] dm-table.c: Sync with 2.4 version.



The 2.4 version of Device-Mapper scans for device-numbers in decimal instead of
hex (in dm_get_device()). Update 2.6 so both versions use the same behavior.

--- linux-2.6.0-test2/drivers/md/dm-table.c	28 Jul 2003 15:40:57 -0000
+++ linux-2.6.0-test2-dm/drivers/md/dm-table.c	29 Jul 2003 15:27:51 -0000
@@ -418,12 +418,12 @@
 	int r;
 	dev_t dev;
 	struct dm_dev *dd;
-	int major, minor;
+	unsigned int major, minor;
 
 	if (!t)
 		BUG();
 
-	if (sscanf(path, "%x:%x", &major, &minor) == 2) {
+	if (sscanf(path, "%u:%u", &major, &minor) == 2) {
 		/* Extract the major/minor numbers */
 		dev = MKDEV(major, minor);
 	} else {




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