mtd/drivers/mtd/devices phram.c,1.4,1.5

joern at infradead.org joern at infradead.org
Thu Nov 25 08:54:12 EST 2004


Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv3229/drivers/mtd/devices

Modified Files:
	phram.c 
Log Message:
Make dwmw2 happy and add an i to [kMG].



Index: phram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/phram.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- phram.c	25 Nov 2004 13:52:53 -0000	1.4
+++ phram.c	25 Nov 2004 13:54:09 -0000	1.5
@@ -15,11 +15,11 @@
  *   phram=<name>,<start>,<len>
  * <name> may be up to 63 characters.
  * <start> and <len> can be octal, decimal or hexadecimal.  If followed
- * by "k", "M" or "G", the numbers will be interpreted as kilo, mega or
+ * by "ki", "Mi" or "Gi", the numbers will be interpreted as kilo, mega or
  * gigabytes.
  *
  * Example:
- *	phram=swap,896M,110M phram=test,1006M,1M
+ *	phram=swap,896Mi,110Mi phram=test,1006Mi,1Mi
  *
  */
 
@@ -187,7 +187,9 @@
 		result *= 1024;
 	case 'k':
 		result *= 1024;
-		(*endp)++;
+	/* By dwmw2 editorial decree, "ki", "Mi" or "Gi" are to be used. */
+		if (*endp[1] == 'i')
+			(*endp) += 2;
 	}
 	return result;
 }





More information about the linux-mtd-cvs mailing list