mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcAppleDiskImageLib: Add Chunklist-aided VerifyData API
This commit is contained in:
parent
c1e462f277
commit
dacd1f91a6
@ -15,6 +15,8 @@
|
||||
|
||||
#include <IndustryStandard/AppleDiskImage.h>
|
||||
|
||||
#include <Library/OcAppleChunklistLib.h>
|
||||
|
||||
//
|
||||
// Disk image context.
|
||||
//
|
||||
@ -45,6 +47,12 @@ OcAppleDiskImageFreeContext(
|
||||
IN OC_APPLE_DISK_IMAGE_CONTEXT *Context
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
OcAppleDiskImageVerifyData (
|
||||
IN OUT OC_APPLE_DISK_IMAGE_CONTEXT *Context,
|
||||
IN OUT OC_APPLE_CHUNKLIST_CONTEXT *ChunklistContext
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
OcAppleDiskImageRead (
|
||||
IN OC_APPLE_DISK_IMAGE_CONTEXT *Context,
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/OcAppleChunklistLib.h>
|
||||
#include <Library/OcAppleDiskImageLib.h>
|
||||
#include <Library/OcCompressionLib.h>
|
||||
#include <Library/OcGuardLib.h>
|
||||
@ -170,6 +171,22 @@ OcAppleDiskImageInitializeContext (
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
OcAppleDiskImageVerifyData (
|
||||
IN OUT OC_APPLE_DISK_IMAGE_CONTEXT *Context,
|
||||
IN OUT OC_APPLE_CHUNKLIST_CONTEXT *ChunklistContext
|
||||
)
|
||||
{
|
||||
ASSERT (Context != NULL);
|
||||
ASSERT (ChunklistContext != NULL);
|
||||
|
||||
return OcAppleChunklistVerifyData (
|
||||
ChunklistContext,
|
||||
Context->Buffer,
|
||||
Context->Length
|
||||
);
|
||||
}
|
||||
|
||||
VOID
|
||||
OcAppleDiskImageFreeContext (
|
||||
IN OC_APPLE_DISK_IMAGE_CONTEXT *Context
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user