mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcBootManagementLib: Print all boot Device Paths
This commit is contained in:
parent
4a0f79fc14
commit
375245f142
@ -17,6 +17,7 @@
|
||||
|
||||
#include <Guid/AppleApfsInfo.h>
|
||||
#include <Guid/AppleBless.h>
|
||||
#include <Guid/AppleVariable.h>
|
||||
#include <Guid/FileInfo.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
|
||||
@ -652,7 +653,7 @@ InternalGetDefaultBootEntry (
|
||||
EFI_DEVICE_PATH_PROTOCOL *OcRemainingDevicePath;
|
||||
UINT32 OptionalDataSize;
|
||||
VOID *OptionalData;
|
||||
CHAR16 *DefaultDevicePathText;
|
||||
CHAR16 *DevicePathText;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_HANDLE DeviceHandle;
|
||||
@ -694,6 +695,48 @@ InternalGetDefaultBootEntry (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Status = GetVariable2 (
|
||||
L"efi-boot-device-data",
|
||||
&gAppleBootVariableGuid,
|
||||
(VOID **)&UefiDevicePath,
|
||||
&RootDevicePathSize
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DevicePathText = ConvertDevicePathToText (UefiDevicePath, FALSE, FALSE);
|
||||
if (DevicePathText != NULL) {
|
||||
DEBUG ((DEBUG_INFO, "OCB: efi-boot-device-data = %s\n", DevicePathText));
|
||||
FreePool (DevicePathText);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
for (Index = 0; Index < (BootOrderSize / sizeof (*BootOrder)); ++Index) {
|
||||
UefiDevicePath = InternalGetBootOptionData (
|
||||
BootOrder[Index],
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
if (UefiDevicePath == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
DevicePathText = ConvertDevicePathToText (UefiDevicePath, FALSE, FALSE);
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OCB: %d -> Boot%04x = %s\n",
|
||||
Index,
|
||||
BootOrder[Index],
|
||||
DevicePathText
|
||||
));
|
||||
if (DevicePathText != NULL) {
|
||||
FreePool (DevicePathText);
|
||||
}
|
||||
|
||||
FreePool (UefiDevicePath);
|
||||
}
|
||||
);
|
||||
|
||||
UefiDevicePath = InternalGetBootOptionData (
|
||||
BootOrder[0],
|
||||
NULL,
|
||||
@ -767,10 +810,10 @@ InternalGetDefaultBootEntry (
|
||||
OcFixAppleBootDevicePath (UefiDevicePath);
|
||||
|
||||
DEBUG_CODE (
|
||||
DefaultDevicePathText = ConvertDevicePathToText (UefiDevicePath, FALSE, FALSE);
|
||||
if (DefaultDevicePathText != NULL) {
|
||||
DEBUG ((DEBUG_INFO, "OCB: Default boot Device Path: %s\n", DefaultDevicePathText));
|
||||
FreePool (DefaultDevicePathText);
|
||||
DevicePathText = ConvertDevicePathToText (UefiDevicePath, FALSE, FALSE);
|
||||
if (DevicePathText != NULL) {
|
||||
DEBUG ((DEBUG_INFO, "OCB: Default boot Device Path: %s\n", DevicePathText));
|
||||
FreePool (DevicePathText);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
gAppleBlessedOsxFolderInfoGuid ## SOMETIMES_CONSUMES
|
||||
gEfiFileInfoGuid ## SOMETIMES_CONSUMES
|
||||
gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES
|
||||
gAppleBootVariableGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
[Protocols]
|
||||
gAppleBootPolicyProtocolGuid ## PRODUCES
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user