X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=choosers%2Fsimple.c;h=d0c38f7bee6dd89098c25db1f48a4ed13ee75db0;hb=35066b3244e795da02400086f85660e9b0b9e490;hp=91ab8a94002742b08a3e9e51b451364ac88e06a8;hpb=d38858b0a1d960e82104939c810e6d4f30cbe6b0;p=debian%2Felilo diff --git a/choosers/simple.c b/choosers/simple.c index 91ab8a9..d0c38f7 100644 --- a/choosers/simple.c +++ b/choosers/simple.c @@ -1,6 +1,10 @@ /* * Copyright (C) 2001-2003 Hewlett-Packard Co. * Contributed by Stephane Eranian + * Copyright (C) 2006-2009 Intel Corporation + * Contributed by Fenghua Yu + * Contributed by Bibo Mao + * Contributed by Chandramouli Narayanan * * This file is part of the ELILO, the EFI Linux boot loader. * @@ -28,6 +32,7 @@ #include "elilo.h" #include "vars.h" +#include "console.h" /* static is ugly but does the job here! */ static CHAR16 **alt_argv; @@ -36,8 +41,8 @@ static VOID 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]; @@ -136,7 +141,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; @@ -215,7 +221,7 @@ display_message(VOID) { fops_fd_t fd; EFI_STATUS status; - INTN len, i; + UINTN len, i; CHAR16 *filename; CHAR8 buf[256]; @@ -248,10 +254,10 @@ simple_choose(CHAR16 **argv, INTN argc, INTN index, CHAR16 *kname, CHAR16 *cmdli # 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; @@ -283,8 +289,10 @@ restart: } 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; } @@ -350,7 +358,7 @@ restart: 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;