MdePkg/UefiImageLib: Add API for the image format ID

This commit is contained in:
Marvin Häuser 2023-04-23 23:48:15 +02:00 committed by Mikhail Krichanov
parent b9a2fa8473
commit dcdb8d3425
2 changed files with 20 additions and 0 deletions

View File

@ -125,6 +125,18 @@ UefiImageInitializeContext (
IN UINT32 FileSize
);
/**
Retrieves the UefiImageLib Image format identifier.
@param[out] Context The context describing the Image.
@returns The UefiImageLib format identifier.
**/
UINT8
UefiImageGetFormat (
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context
);
/**
Hashes the Image using the format's default hashing algorithm.

View File

@ -46,6 +46,14 @@ UefiImageInitializeContextPostHash (
return RETURN_SUCCESS;
}
UINT8
UefiImageGetFormat (
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context
)
{
return UefiImageFormatPe;
}
BOOLEAN
UefiImageHashImageDefault (
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,