X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=alternate.c;h=691adc74aaa647a0ed429c16eb7259a21e611620;hb=3384f0373c8758e5ddd08f489ad7110898dd5406;hp=df138ad8764ec004798ffd781ec09f2d6e9093fd;hpb=054761502f884ae2cb147c75bd17a660fe63b071;p=debian%2Felilo diff --git a/alternate.c b/alternate.c index df138ad..691adc7 100644 --- a/alternate.c +++ b/alternate.c @@ -1,6 +1,9 @@ /* * Copyright (C) 2001-2003 Hewlett-Packard Co. * Contributed by Stephane Eranian + * Contributed by Fenghua Yu + * Contributed by Bibo Mao + * Contributed by Chandramouli Narayanan * * This file is part of the ELILO, the EFI Linux boot loader. * @@ -53,7 +56,7 @@ static EFI_GUID altk_guid={0,}; * Please note that no fatal error is reported by this function */ INTN -alternate_kernel(CHAR16 *buffer, INTN size) +alternate_kernel(CHAR16 *buffer, UINTN size) { EFI_STATUS status; INTN ret = -1; @@ -77,7 +80,7 @@ alternate_kernel(CHAR16 *buffer, INTN size) * - the variable does not exist * - our buffer size is too small. */ - status = RT->GetVariable(ELILO_ALTK_VAR, &altk_guid, NULL, &size, buffer); + status = uefi_call_wrapper(RT->GetVariable, 5, ELILO_ALTK_VAR, &altk_guid, NULL, &size, buffer); if (EFI_ERROR(status)) { DBG_PRT((L"cannot access variable %s: %r", ELILO_ALTK_VAR, status)); @@ -110,7 +113,7 @@ alternate_kernel(CHAR16 *buffer, INTN size) ret = 0; delete_var: - status = RT->SetVariable(ELILO_ALTK_VAR, &altk_guid, 0, 0, NULL); + status = uefi_call_wrapper(RT->SetVariable, 5, ELILO_ALTK_VAR, &altk_guid, 0, 0, NULL); if (EFI_ERROR(status)) { ERR_PRT((L"cannot erase variable %s", ELILO_ALTK_VAR)); }