X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=choosers%2Ftextmenu.c;h=57e3eaed90aa6799eba23c832719a7dd7bf5421b;hb=3384f0373c8758e5ddd08f489ad7110898dd5406;hp=3210dda1b91e8344d2af5569e382d89440baceea;hpb=8e0034665aa8483b27191c723608575536d01303;p=debian%2Felilo diff --git a/choosers/textmenu.c b/choosers/textmenu.c index 3210dda..57e3eae 100644 --- a/choosers/textmenu.c +++ b/choosers/textmenu.c @@ -1,6 +1,10 @@ /* * Copyright (C) 2001-2003 Hewlett-Packard Co. * Contributed by Richard Hirst + * 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. * @@ -45,8 +49,8 @@ static CHAR16 PromptBuf[CMDLINE_MAXLEN]; #define DEF_ATTR EFI_TEXT_ATTR(EFI_LIGHTGRAY,EFI_BLACK) -#define ClearScreen() ST->ConOut->ClearScreen(ST->ConOut) -#define SetTextAttr(a) ST->ConOut->SetAttribute(ST->ConOut, a) +#define ClearScreen() uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut) +#define SetTextAttr(a) uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, a) static INTN tohex(INTN c) @@ -182,12 +186,12 @@ paint_menu(VOID) } static INTN -read_message_file(INTN msg, INT8 *buf, INTN max) +read_message_file(INTN msg, UINT8 *buf, UINTN max) { CHAR16 *filename; fops_fd_t message_fd; EFI_STATUS status; - INTN len = max; + UINTN len = max; if (msg > 10) return 0; @@ -249,7 +253,8 @@ reprint: SetTextAttr(CurrentAttr); 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)) { SetTextAttr(EFI_TEXT_ATTR(EFI_LIGHTGRAY,EFI_BLACK)); ClearScreen(); @@ -295,7 +300,7 @@ reprint: if (i) { msgbuf[i] = 0; paint_msg(msgbuf); - while ((status=ip->ReadKeyStroke(ip, &key)) == EFI_NOT_READY); + while ((status= uefi_call_wrapper(ip->ReadKeyStroke, 2, ip, &key)) == EFI_NOT_READY); goto reprint; } } @@ -465,7 +470,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; }