mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
Add function DevPathFromTextRelativeOffsetRange ().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8023 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0a9fe76339
commit
192b057b07
@ -2573,6 +2573,39 @@ DevPathFromTextFvFile (
|
|||||||
return (EFI_DEVICE_PATH_PROTOCOL *) FvFile;
|
return (EFI_DEVICE_PATH_PROTOCOL *) FvFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Converts a text device path node to text relative offset device path structure.
|
||||||
|
|
||||||
|
@param TextDeviceNode The input Text device path node.
|
||||||
|
|
||||||
|
@return A pointer to the newly-created Text device path structure.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *
|
||||||
|
DevPathFromTextRelativeOffsetRange (
|
||||||
|
IN CHAR16 *TextDeviceNode
|
||||||
|
)
|
||||||
|
{
|
||||||
|
CHAR16 *StartingOffsetStr;
|
||||||
|
CHAR16 *EndingOffsetStr;
|
||||||
|
MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
|
||||||
|
*Offset;
|
||||||
|
|
||||||
|
StartingOffsetStr = GetNextParamStr (&TextDeviceNode);
|
||||||
|
EndingOffsetStr = GetNextParamStr (&TextDeviceNode);
|
||||||
|
Offset = (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *)
|
||||||
|
CreateDeviceNode (
|
||||||
|
MEDIA_DEVICE_PATH,
|
||||||
|
MEDIA_RELATIVE_OFFSET_RANGE_DP,
|
||||||
|
sizeof (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH)
|
||||||
|
);
|
||||||
|
|
||||||
|
Strtoi64 (StartingOffsetStr, &Offset->StartingOffset);
|
||||||
|
Strtoi64 (EndingOffsetStr, &Offset->EndingOffset);
|
||||||
|
|
||||||
|
return (EFI_DEVICE_PATH_PROTOCOL *) Offset;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts a text device path node to BIOS Boot Specification device path structure.
|
Converts a text device path node to BIOS Boot Specification device path structure.
|
||||||
|
|
||||||
@ -2728,6 +2761,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE DevPathFromTextTable[]
|
|||||||
{L"Media", DevPathFromTextMedia},
|
{L"Media", DevPathFromTextMedia},
|
||||||
{L"Fv", DevPathFromTextFv},
|
{L"Fv", DevPathFromTextFv},
|
||||||
{L"FvFile", DevPathFromTextFvFile},
|
{L"FvFile", DevPathFromTextFvFile},
|
||||||
|
{L"Offset", DevPathFromTextRelativeOffsetRange},
|
||||||
{L"BBS", DevPathFromTextBBS},
|
{L"BBS", DevPathFromTextBBS},
|
||||||
{L"Sata", DevPathFromTextSata},
|
{L"Sata", DevPathFromTextSata},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user