X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=choosers%2Ftextmenu.c;h=400d4f6489013df9abbcd2d619b73e7376aa2aba;hb=refs%2Ftags%2Fdebian%2F3.7-2;hp=7fc2ec141db633e0ef2a07cb86d086160c6c9d83;hpb=d38858b0a1d960e82104939c810e6d4f30cbe6b0;p=debian%2Felilo diff --git a/choosers/textmenu.c b/choosers/textmenu.c index 7fc2ec1..400d4f6 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) @@ -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; } }