/*
* 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.
*
#include "elilo.h"
#include "vars.h"
+#include "console.h"
/* static is ugly but does the job here! */
static CHAR16 **alt_argv;
display_label_info(CHAR16 *name)
{
CHAR16 *desc;
- CHAR16 initrd_name[CMDLINE_MAXLEN];
- CHAR16 vmcode_name[CMDLINE_MAXLEN];
+ CHAR16 initrd_name[PATHNAME_MAXLEN];
+ CHAR16 vmcode_name[PATHNAME_MAXLEN];
CHAR16 options_tmp[CMDLINE_MAXLEN];
CHAR16 options[CMDLINE_MAXLEN];
CHAR16 kname[FILENAME_MAXLEN];
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;
{
fops_fd_t fd;
EFI_STATUS status;
- INTN len, i;
+ UINTN len, i;
CHAR16 *filename;
CHAR8 buf[256];
# define BOOT_IMG_STR L"BOOT_IMAGE="
CHAR16 buffer[CMDLINE_MAXLEN];
CHAR16 alt_buffer[CMDLINE_MAXLEN];
- CHAR16 initrd_name[CMDLINE_MAXLEN];
- CHAR16 vmcode_name[CMDLINE_MAXLEN];
+ CHAR16 initrd_name[PATHNAME_MAXLEN];
+ CHAR16 vmcode_name[PATHNAME_MAXLEN];
CHAR16 args[CMDLINE_MAXLEN];
- CHAR16 devname[CMDLINE_MAXLEN];
+ CHAR16 devname[PATHNAME_MAXLEN];
CHAR16 dpath[FILENAME_MAXLEN];
CHAR16 *slash_pos, *colon_pos, *backslash_pos;
UINTN len;
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
}
if (elilo_opt.prompt) {
- ret = select_kernel(buffer, sizeof(buffer));
+ console_textmode();
+ ret = select_kernel(buffer, CMDLINE_MAXLEN);
if (ret == -1) return -1;
+ /* this function takes really the number of bytes ... */
argc = argify(buffer,sizeof(buffer), argv);
index = 0;
}
if (elilo_opt.prompt == 0) {
/* minimal printing */
- Print(L"ELILO\n");
+ Print(L"ELILO v%s for EFI/%a\n", ELILO_VERSION, ELILO_ARCH);
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;
- elilo_opt.initrd[0] = CHAR_NULL;
goto restart;
}
}