Imported Upstream version 3.10
[debian/elilo] / elilo.c
diff --git a/elilo.c b/elilo.c
index ad1b555a2218ee9d155f556ec277006f19d9cfae..50ee71c585e7d5dbab647d7d20e3fb895cb6af7d 100644 (file)
--- a/elilo.c
+++ b/elilo.c
 #include "loader.h"
 #include "config.h" /* for config_init() */
 
-#define ELILO_VERSION                  L"3.8"
+#define ELILO_VERSION                  L"3.10"
 #define ELILO_SHARED_CMDLINE_OPTS      L"pPMC:aDhd:i:vVc:E"
 
 elilo_config_t elilo_opt;
 
 EFI_SYSTEM_TABLE *systab;      /* pointer to EFI system table */
 
+extern INTN wait_timeout (UINTN);
+
 /*
  * Load the Linux kernel in memory from the boot media
  * Output:
@@ -127,11 +129,12 @@ kernel_load(EFI_HANDLE image, CHAR16 *kname, kdesc_t *kd, memdesc_t *imem, memde
                        return ELILO_LOAD_RETRY;        
        }
 
-       VERB_PRT(3, Print(L"kernel loaded in [0x%lx-0x%lx] entry=0x%lx\n", 
-                         (unsigned long)kd->kstart, (unsigned long)kd->kend, (unsigned long)kd->kentry));
+       VERB_PRT(3, Print(L"kernel loaded in [" PTR_FMT "-" PTR_FMT "] entry=" PTR_FMT "\n", 
+                         kd->kstart, kd->kend, kd->kentry));
 
        if (elilo_opt.initrd[0]) {
 
+               /* ramdisk image is moved to the top of available extended memory later by start_kernel() */
                if (sysdeps_initrd_get_addr(kd, imem) == -1) goto exit_error;
 
                switch(load_file(elilo_opt.initrd, imem)) {
@@ -242,6 +245,9 @@ do_launch:
 
        VERB_PRT(3, Print(L"final cmdline(%d): %s\n", r, cmdline));
 
+       /* Give user time to see the output before launch */
+       if (elilo_opt.debug || elilo_opt.verbose) r = wait_timeout(300);
+
        /* free resources associated with file accesses (before ExitBootServices) */
        close_devices();
 
@@ -455,7 +461,7 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *system_tab)
                return EFI_LOAD_ERROR;
        }
 
-       VERB_PRT(5,Print(L"Loaded at 0x%lx size=%d bytes code=%d data=%d\n", info->ImageBase, info->ImageSize, info->ImageCodeType, info->ImageDataType));
+       VERB_PRT(5,Print(L"Loaded at " PTR_FMT " size=%ld bytes code=%d data=%d\n", info->ImageBase, info->ImageSize, info->ImageCodeType, info->ImageDataType));
        /*
         * verify EDD3.0 status. Users may have to reboot 
         */
@@ -599,7 +605,7 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *system_tab)
                                goto do_exit;
                }
        }
-       DBG_PRT((L"Optind=%d optarg=%x argc=%d", Optind, Optarg, argc));
+       DBG_PRT((L"Optind=%d optarg=" PTR_FMT " argc=%d", Optind, Optarg, argc));
 
        /*
         * we can't defer this phase any longer...