On Wed, Jul 11, 2007 at 11:27:53AM -0700, ron minnich wrote:
Acked-by: Ronald G. Minnich rminnich@gmail.com
Yep,
Acked-by: Uwe Hermann uwe@hermann-uwe.de
But some small issues:
+/* Add a human touch to the LAR size by allowing suffixes:
- XX[KkMm] where k = XX * 1024 and m or M = xx * 1024 * 1024
+*/
/* Add a human touch to the LAR size by allowing suffixes: * XX[KkMm] where k = XX * 1024 and m or M = xx * 1024 * 1024 */
+static void parse_larsize(char *str)
static void parse_larsize(const char *str)
+{
- char *p = NULL;
- unsigned int size = strtoul(str, &p, 0);
- if (p != NULL) {
- if (*p == 'k' || *p == 'K')
size *= 1024;
- else if (*p == 'm' || *p == 'M')
size *= (1024 * 1024);
- else {
fprintf(stderr, "Unknown LAR size suffix %c\n", *p);
exit(1);
- }
- }
- larsize = size;
+}
Please fix the coding style (TABs instead of spaces, for example).
Uwe.