[Patch 3/6] dm: decimal device num sscanf

From: Joe Thornber (thornber@sistina.com)
Date: Thu Jul 31 2003 - 05:49:53 EST


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. [Kevin Corry]

--- diff/drivers/md/dm-table.c 2003-07-28 11:55:33.000000000 +0100
+++ source/drivers/md/dm-table.c 2003-07-31 11:13:24.000000000 +0100
@@ -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 {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:49 EST