Imported Upstream version 3.7
[debian/elilo] / choosers / simple.c
index b246a910fad125e5dd59a9edab40edd9495fb931..552508661367fc822fd5c23c6c5b3d031acc9bc3 100644 (file)
@@ -1,6 +1,10 @@
 /* 
  *  Copyright (C) 2001-2003 Hewlett-Packard Co.
  *     Contributed by Stephane Eranian <eranian@hpl.hp.com>
+ *  Copyright (C) 2006-2009 Intel Corporation
+ *     Contributed by Fenghua Yu <fenghua.yu@intel.com>
+ *     Contributed by Bibo Mao <bibo.mao@intel.com>
+ *     Contributed by Chandramouli Narayanan <mouli@linux.intel.com>
  *
  * This file is part of the ELILO, the EFI Linux boot loader.
  *
@@ -136,7 +140,8 @@ reprint:
        first_time = 0;
 
        for (;;) {
-               while ((status=ip->ReadKeyStroke(ip, &key)) == EFI_NOT_READY);
+               while ((status = uefi_call_wrapper(ip->ReadKeyStroke, 2, ip, &key))
+                                == EFI_NOT_READY);
                if (EFI_ERROR(status)) {
                        ERR_PRT((L"select_kernel readkey: %r", status));
                        return -1;
@@ -274,7 +279,7 @@ restart:
                argc     = argify(alt_buffer,sizeof(alt_buffer), argv); 
                alt_argv = argv;
                index    = 0;
-               args[0]  = initrd_name[0] = 0;
+               args[0]  = initrd_name[0] = vmcode_name[0] = 0;
                /* 
                 * don't check twice because the variable is deleted after
                 * first access
@@ -354,7 +359,7 @@ restart:
                ret = wait_timeout(elilo_opt.delay);
                if (ret != 0) {
                        elilo_opt.prompt = 1;
-                       elilo_opt.initrd[0] = CHAR_NULL;
+                       elilo_opt.initrd[0] = elilo_opt.vmcode[0] = CHAR_NULL;
                        elilo_opt.timeout =  ELILO_TIMEOUT_INFINITY;
                        goto restart;
                }