mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcDevicePathLib: Add support for short-form expansion
This commit is contained in:
parent
d195572f74
commit
85a0833e53
@ -151,4 +151,23 @@ OcFixAppleBootDevicePath (
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
Get the next possible full path pointing to the load option.
|
||||
The routine doesn't guarantee the returned full path points to an existing
|
||||
file, and it also doesn't guarantee the existing file is a valid load option.
|
||||
|
||||
@param FilePath The device path pointing to a load option.
|
||||
It could be a short-form device path.
|
||||
@param FullPath The full path returned by the routine in last call.
|
||||
Set to NULL in first call.
|
||||
|
||||
@return The next possible full path pointing to the load option.
|
||||
Caller is responsible to free the memory.
|
||||
**/
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
OcGetNextLoadOptionDevicePath (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FullPath
|
||||
);
|
||||
|
||||
#endif // OC_DEVICE_PATH_LIB_H
|
||||
|
||||
@ -267,7 +267,10 @@ OcFixAppleBootDevicePath (
|
||||
ASSERT (DevicePath != NULL);
|
||||
ASSERT (*DevicePath != NULL);
|
||||
ASSERT (IsDevicePathValid (*DevicePath, 0));
|
||||
|
||||
//
|
||||
// CAUTION: When adding new fixes, ensure short-form device paths are not
|
||||
// modified and success is returned.
|
||||
//
|
||||
OriginalDevPath = *DevicePath;
|
||||
|
||||
while (TRUE) {
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
[Sources]
|
||||
OcDevicePathLib.c
|
||||
ExpandDevicePath.c
|
||||
|
||||
[Packages]
|
||||
OcSupportPkg/OcSupportPkg.dec
|
||||
@ -42,3 +43,6 @@
|
||||
[Protocols]
|
||||
gEfiDevicePathToTextProtocolGuid
|
||||
gEfiSimpleFileSystemProtocolGuid
|
||||
gEfiBlockIoProtocolGuid
|
||||
gEfiUsbIoProtocolGuid
|
||||
gEfiLoadFileProtocolGuid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user