mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcMachoLib: Introduce MachoGetFileSize() API.
This commit is contained in:
parent
3b9ad05f71
commit
8ddbd9fdd4
@ -56,6 +56,17 @@ MachoGetMachHeader64 (
|
||||
IN OUT OC_MACHO_CONTEXT *Context
|
||||
);
|
||||
|
||||
/**
|
||||
Returns the Mach-O's file size.
|
||||
|
||||
@param[in,out] Context Context of the Mach-O.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
MachoGetFileSize (
|
||||
IN OUT OC_MACHO_CONTEXT *Context
|
||||
);
|
||||
|
||||
/**
|
||||
Returns the last virtual address of a Mach-O.
|
||||
|
||||
|
||||
@ -51,6 +51,23 @@ MachoGetMachHeader64 (
|
||||
return (MACH_HEADER_64 *)Context->MachHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the Mach-O's file size.
|
||||
|
||||
@param[in,out] Context Context of the Mach-O.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
MachoGetFileSize (
|
||||
IN OUT OC_MACHO_CONTEXT *Context
|
||||
)
|
||||
{
|
||||
ASSERT (Context != NULL);
|
||||
ASSERT (Context->FileSize != 0);
|
||||
|
||||
return Context->FileSize;
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes a Mach-O Context.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user