diff options
| author | Peter Jones <pjones@redhat.com> | 2021-07-23 14:28:59 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-09-07 17:05:04 -0400 |
| commit | 6ea93a28759d754778e483f86f95587a01c5fee8 (patch) | |
| tree | 80d24240d34e57863c9142b2bc5ab5006e9b060b /lib | |
| parent | 116a8310ab93d803fa51f9ba9f3d6d0cb691e2bf (diff) | |
| download | efi-boot-shim-6ea93a28759d754778e483f86f95587a01c5fee8.tar.gz efi-boot-shim-6ea93a28759d754778e483f86f95587a01c5fee8.zip | |
cleanup: always use BS and RT, not gBS and gRT
This just makes one less thing we have to make sure is the same between
the test harnesses and the runtime code.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/console.c | 6 | ||||
| -rw-r--r-- | lib/execute.c | 10 | ||||
| -rw-r--r-- | lib/security_policy.c | 2 | ||||
| -rw-r--r-- | lib/shell.c | 2 | ||||
| -rw-r--r-- | lib/simple_file.c | 20 |
5 files changed, 20 insertions, 20 deletions
diff --git a/lib/console.c b/lib/console.c index c310d213..5193b578 100644 --- a/lib/console.c +++ b/lib/console.c @@ -35,7 +35,7 @@ console_get_keystroke(EFI_INPUT_KEY *key) EFI_STATUS efi_status; do { - gBS->WaitForEvent(1, &ci->WaitForKey, &EventIndex); + BS->WaitForEvent(1, &ci->WaitForKey, &EventIndex); efi_status = ci->ReadKeyStroke(ci, key); } while (efi_status == EFI_NOT_READY); @@ -495,7 +495,7 @@ console_mode_handle(VOID) UINTN rows = 0, columns = 0; EFI_STATUS efi_status = EFI_SUCCESS; - efi_status = gBS->LocateProtocol(&gop_guid, NULL, (void **)&gop); + efi_status = BS->LocateProtocol(&gop_guid, NULL, (void **)&gop); if (EFI_ERROR(efi_status)) { console_error(L"Locate graphic output protocol fail", efi_status); return; @@ -679,7 +679,7 @@ setup_verbosity(VOID) VOID msleep(unsigned long msecs) { - gBS->Stall(msecs); + BS->Stall(msecs); } /* This is used in various things to determine if we should print to the diff --git a/lib/execute.c b/lib/execute.c index 642f94a3..0eb872e4 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -63,8 +63,8 @@ execute(EFI_HANDLE image, CHAR16 *name) EFI_DEVICE_PATH *devpath; CHAR16 *PathName; - efi_status = gBS->HandleProtocol(image, &IMAGE_PROTOCOL, - (void **) &li); + efi_status = BS->HandleProtocol(image, &IMAGE_PROTOCOL, + (void **) &li); if (EFI_ERROR(efi_status)) return efi_status; @@ -72,12 +72,12 @@ execute(EFI_HANDLE image, CHAR16 *name) if (EFI_ERROR(efi_status)) return efi_status; - efi_status = gBS->LoadImage(FALSE, image, devpath, NULL, 0, &h); + efi_status = BS->LoadImage(FALSE, image, devpath, NULL, 0, &h); if (EFI_ERROR(efi_status)) goto out; - efi_status = gBS->StartImage(h, NULL, NULL); - gBS->UnloadImage(h); + efi_status = BS->StartImage(h, NULL, NULL); + BS->UnloadImage(h); out: FreePool(PathName); diff --git a/lib/security_policy.c b/lib/security_policy.c index 6c42cc14..0f2569b0 100644 --- a/lib/security_policy.c +++ b/lib/security_policy.c @@ -123,7 +123,7 @@ security_policy_authentication ( * EFI_SECURITY_VIOLATION */ fail_status = efi_status; - efi_status = gBS->LocateDevicePath(&SIMPLE_FS_PROTOCOL, &DevPath, &h); + efi_status = BS->LocateDevicePath(&SIMPLE_FS_PROTOCOL, &DevPath, &h); if (EFI_ERROR(efi_status)) goto out; diff --git a/lib/shell.c b/lib/shell.c index 146d9a21..8be4fe08 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -16,7 +16,7 @@ argsplit(EFI_HANDLE image, int *argc, CHAR16*** ARGV) *argc = 0; - efi_status = gBS->HandleProtocol(image, &LoadedImageProtocol, + efi_status = BS->HandleProtocol(image, &LoadedImageProtocol, (VOID **) &info); if (EFI_ERROR(efi_status)) { console_print(L"Failed to get arguments\n"); diff --git a/lib/simple_file.c b/lib/simple_file.c index 5fd3e1a6..f22852d4 100644 --- a/lib/simple_file.c +++ b/lib/simple_file.c @@ -11,8 +11,8 @@ simple_file_open_by_handle(EFI_HANDLE device, CHAR16 *name, EFI_FILE **file, UIN EFI_FILE_IO_INTERFACE *drive; EFI_FILE *root; - efi_status = gBS->HandleProtocol(device, &EFI_SIMPLE_FILE_SYSTEM_GUID, - (void **)&drive); + efi_status = BS->HandleProtocol(device, &EFI_SIMPLE_FILE_SYSTEM_GUID, + (void **)&drive); if (EFI_ERROR(efi_status)) { console_print(L"Unable to find simple file protocol (%d)\n", efi_status); @@ -40,8 +40,8 @@ simple_file_open(EFI_HANDLE image, CHAR16 *name, EFI_FILE **file, UINT64 mode) EFI_DEVICE_PATH *loadpath = NULL; CHAR16 *PathName = NULL; - efi_status = gBS->HandleProtocol(image, &IMAGE_PROTOCOL, - (void **) &li); + efi_status = BS->HandleProtocol(image, &IMAGE_PROTOCOL, + (void **) &li); if (EFI_ERROR(efi_status)) return simple_file_open_by_handle(image, name, file, mode); @@ -176,9 +176,9 @@ simple_volume_selector(CHAR16 **title, CHAR16 **selected, EFI_HANDLE *h) CHAR16 **entries; int val; - efi_status = gBS->LocateHandleBuffer(ByProtocol, - &EFI_SIMPLE_FILE_SYSTEM_GUID, - NULL, &count, &vol_handles); + efi_status = BS->LocateHandleBuffer(ByProtocol, + &EFI_SIMPLE_FILE_SYSTEM_GUID, + NULL, &count, &vol_handles); if (EFI_ERROR(efi_status)) return efi_status; if (!count || !vol_handles) @@ -196,9 +196,9 @@ simple_volume_selector(CHAR16 **title, CHAR16 **selected, EFI_HANDLE *h) CHAR16 *name; EFI_FILE_IO_INTERFACE *drive; - efi_status = gBS->HandleProtocol(vol_handles[i], - &EFI_SIMPLE_FILE_SYSTEM_GUID, - (void **) &drive); + efi_status = BS->HandleProtocol(vol_handles[i], + &EFI_SIMPLE_FILE_SYSTEM_GUID, + (void **) &drive); if (EFI_ERROR(efi_status) || !drive) continue; |
