From: Jan Kiszka <
jan.k...@siemens.com>
...rather than "boot device". No functional changes.
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
bootguard.c | 2 +-
docs/RECOVERY.md | 2 +-
env/syspart.c | 12 ++++++------
include/utils.h | 2 +-
main.c | 8 ++++----
utils.c | 8 ++++----
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/bootguard.c b/bootguard.c
index 9eea350..22a2a8a 100644
--- a/bootguard.c
+++ b/bootguard.c
@@ -18,4 +18,4 @@ EFI_HANDLE this_image;
VOLUME_DESC *volumes = NULL;
UINTN volume_count = 128;
-CHAR16 *boot_device_path;
+CHAR16 *boot_medium_path;
diff --git a/docs/RECOVERY.md b/docs/RECOVERY.md
index caff130..a29a704 100644
--- a/docs/RECOVERY.md
+++ b/docs/RECOVERY.md
@@ -4,7 +4,7 @@ If more than the expected number of environments is detected during boot, the
system stops booting. This can be a problem if the user wants to boot the
system with a memory stick to update a broken installation.
-In order to allow external boot devices with other environment configurations,
+In order to allow external boot media with other environment configurations,
the Recovery Mode was introduced. If any environment is found on the boot
device, the boot loader will only use environments from this device.
diff --git a/env/syspart.c b/env/syspart.c
index 0cfeb79..5e248e5 100644
--- a/env/syspart.c
+++ b/env/syspart.c
@@ -62,29 +62,29 @@ static void swap_uintn(UINTN *a, UINTN *b)
UINTN filter_cfg_parts(UINTN *config_volumes, UINTN numHandles)
{
- BOOLEAN use_envs_on_bootdevice_only = FALSE;
+ BOOLEAN use_envs_on_bootmedium_only = FALSE;
Print(L"Config filter: \n");
for (UINTN index = 0; index < numHandles; index++) {
VOLUME_DESC *v = &volumes[config_volumes[index]];
- if (IsOnBootDevice(v->devpath)) {
- use_envs_on_bootdevice_only = TRUE;
+ if (IsOnBootMedium(v->devpath)) {
+ use_envs_on_bootmedium_only = TRUE;
};
}
- if (!use_envs_on_bootdevice_only) {
+ if (!use_envs_on_bootmedium_only) {
// nothing to do
return numHandles;
}
- Print(L"Booting with environments from boot device only.\n");
+ Print(L"Booting with environments from boot medium only.\n");
UINTN num_sorted = 0;
for (UINTN j = 0; j < numHandles; j++) {
UINTN cvi = config_volumes[j];
VOLUME_DESC *v = &volumes[cvi];
- if (IsOnBootDevice(v->devpath)) {
+ if (IsOnBootMedium(v->devpath)) {
swap_uintn(&config_volumes[j],
&config_volumes[num_sorted++]);
} else {
diff --git a/include/utils.h b/include/utils.h
index 068f89c..8f7b333 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -42,6 +42,6 @@ EFI_STATUS close_volumes(VOLUME_DESC *volumes, UINTN count);
EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device,
CHAR16 *payloadpath);
CHAR16 *GetBootMediumPath(CHAR16 *input);
-BOOLEAN IsOnBootDevice(EFI_DEVICE_PATH *dp);
+BOOLEAN IsOnBootMedium(EFI_DEVICE_PATH *dp);
#endif // __H_UTILS__
diff --git a/main.c b/main.c
index d141720..8c08df9 100644
--- a/main.c
+++ b/main.c
@@ -24,7 +24,7 @@
extern const unsigned long init_array_start[];
extern const unsigned long init_array_end[];
-extern CHAR16 *boot_device_path;
+extern CHAR16 *boot_medium_path;
static EFI_STATUS probe_watchdog(EFI_LOADED_IMAGE *loaded_image,
EFI_PCI_IO *pci_io, UINT16 pci_vendor_id,
@@ -126,9 +126,9 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
}
tmp = DevicePathToStr(DevicePathFromHandle(loaded_image->DeviceHandle));
- boot_device_path = GetBootMediumPath(tmp);
+ boot_medium_path = GetBootMediumPath(tmp);
mfree(tmp);
- Print(L"Boot device: %s\n", boot_device_path);
+ Print(L"Boot medium: %s\n", boot_medium_path);
status = get_volumes(&volumes, &volume_count);
if (EFI_ERROR(status)) {
@@ -183,7 +183,7 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
}
mfree(payload_dev_path);
- mfree(boot_device_path);
+ mfree(boot_medium_path);
status =
uefi_call_wrapper(BS->OpenProtocol, 6, payload_handle,
diff --git a/utils.c b/utils.c
index cb65b88..8ba4663 100644
--- a/utils.c
+++ b/utils.c
@@ -16,9 +16,9 @@
#include <bootguard.h>
#include <utils.h>
-BOOLEAN IsOnBootDevice(EFI_DEVICE_PATH *dp)
+BOOLEAN IsOnBootMedium(EFI_DEVICE_PATH *dp)
{
- extern CHAR16 *boot_device_path;
+ extern CHAR16 *boot_medium_path;
CHAR16 *device_path, *tmp;
BOOLEAN result = FALSE;
@@ -26,7 +26,7 @@ BOOLEAN IsOnBootDevice(EFI_DEVICE_PATH *dp)
device_path = GetBootMediumPath(tmp);
mfree(tmp);
- if (StrCmp(device_path, boot_device_path) == 0) {
+ if (StrCmp(device_path, boot_medium_path) == 0) {
result = TRUE;
}
mfree(device_path);
@@ -177,7 +177,7 @@ EFI_STATUS get_volumes(VOLUME_DESC **volumes, UINTN *count)
(*volumes)[rootCount].fscustomlabel =
get_volume_custom_label((*volumes)[rootCount].root);
Print(L"Volume %d: ", rootCount);
- if (IsOnBootDevice(devpath)) {
+ if (IsOnBootMedium(devpath)) {
Print(L"(On boot medium) ");
}
Print(L"%s, LABEL=%s, CLABEL=%s\n",
--
2.16.4