]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
cleanup and bugfix
authorphcoder <phcoder@debian.bg45.phnet>
Sat, 10 Oct 2009 11:50:10 +0000 (13:50 +0200)
committerphcoder <phcoder@debian.bg45.phnet>
Sat, 10 Oct 2009 11:50:10 +0000 (13:50 +0200)
kern/main.c
kern/mipsel/qemu-r4k/init.c
kern/misc.c

index 222897d7df223089f81fa80cac0ab5138fca3e6a..9215d55e767f18238252c48126428303a7cf9ecd 100644 (file)
@@ -149,45 +149,29 @@ grub_load_normal_mode (void)
 void
 grub_main (void)
 {
-  *((grub_uint8_t *)0x140003f8) = '1';
-
   /* First of all, initialize the machine.  */
   grub_machine_init ();
 
-  *((grub_uint8_t *)0x140003f8) = '2';
-
   /* Hello.  */
   grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
-  *((grub_uint8_t *)0x140003f8) = 'a';
   grub_printf ("Welcome to GRUB!\n\n");
-  *((grub_uint8_t *)0x140003f8) = 'b';
   grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
 
-  *((grub_uint8_t *)0x140003f8) = '3';
-
   /* Load pre-loaded modules and free the space.  */
   grub_register_exported_symbols ();
   grub_load_modules ();
 
-  *((grub_uint8_t *)0x140003f8) = '4';
-
   /* It is better to set the root device as soon as possible,
      for convenience.  */
   grub_machine_set_prefix ();
   grub_env_export ("prefix");
   grub_set_root_dev ();
 
-  *((grub_uint8_t *)0x140003f8) = '5';
-
   grub_register_core_commands ();
   grub_register_rescue_parser ();
   grub_register_rescue_reader ();
 
-  *((grub_uint8_t *)0x140003f8) = '6';
-
   grub_load_config ();
-  *((grub_uint8_t *)0x140003f8) = '7';
   grub_load_normal_mode ();
-  *((grub_uint8_t *)0x140003f8) = '8';
   grub_reader_loop (0);
 }
index c4aec14ff43b32a6ad8b3b09bf3290471a65d18f..269e8b6e62a71b92f1a0f2340857a5077d6dd907 100644 (file)
@@ -21,8 +21,11 @@ grub_get_rtc (void)
 void
 grub_machine_init (void)
 {
+  void *tst;
   grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_STACK_HIGH,
-                      RAMSIZE - GRUB_MACHINE_MEMORY_STACK_HIGH);
+                      RAMSIZE - (GRUB_MACHINE_MEMORY_STACK_HIGH & 0x7fffffff));
+  tst = grub_malloc (10);
+  grub_free (tst);
 }
 
 void
index ba19705f348d9280266b6c83873943c00ae82bc8..1c38fe661baed462a85d370bdded6f4cf67e4d84 100644 (file)
@@ -598,7 +598,7 @@ grub_vsprintf (char *str, const char *fmt, va_list args)
       if (str)
        *str++ = ch;
       else
-       grub_putchar (ch);
+       grub_putchar (ch);
 
       count++;
     }