Skip to contentSkip to conversation

memparse should return long long

PATCH New Christoph Rohland 1 participant 1 message Jan 15, 2001 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memparse should return long long

Hi,

The following patch lets memparse return a long long. This is needed to use mem= on highmem machines.

Greetings
Christoph

arch/i386/kernel/setup.c +1 -1
diff -uNr 2.4.0-ac/arch/i386/kernel/setup.c 2.4.0-ac-memparse/arch/i386/kernel/setup.c
@@ -558,7 +558,7 @@
 				 * blow away any automatically generated
 				 * size
 				 */
-				unsigned long start_at, mem_size;
+				unsigned long long start_at, mem_size;
  
 				if (usermem == 0) {
 					/* first time in: zap the whitelist
include/linux/kernel.h +1 -1
diff -uNr 2.4.0-ac/include/linux/kernel.h 2.4.0-ac-memparse/include/linux/kernel.h
@@ -62,7 +62,7 @@
 extern int vsprintf(char *buf, const char *, va_list);
 extern int get_option(char **str, int *pint);
 extern char *get_options(char *str, int nints, int *ints);
-extern unsigned long memparse(char *ptr, char **retptr);
+extern unsigned long long memparse(char *ptr, char **retptr);
 extern void dev_probe_lock(void);
 extern void dev_probe_unlock(void);
 
lib/cmdline.c +2 -2
diff -uNr 2.4.0-ac/lib/cmdline.c 2.4.0-ac-memparse/lib/cmdline.c
@@ -93,9 +93,9 @@
  *	megabyte, or one gigabyte, respectively.
  */
 
-unsigned long memparse (char *ptr, char **retptr)
+unsigned long long memparse (char *ptr, char **retptr)
 {
-	unsigned long ret = simple_strtoul (ptr, retptr, 0);
+	unsigned long long ret = simple_strtoul (ptr, retptr, 0);
 
 	switch (**retptr) {
 	case 'G':

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/