[Description]

modify the value pointed by NumberOfPages to accordance with IN&OUT modifier's syntax.
[Impaction]
add comments for NumberOfPages parameter and assign a correct value to it.
[Reference Info]
NumberOfPages is only updated inside the if statement on line 725. If buffer is big enough the actual number of pages occupied by the image is not returned

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5112 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2008-04-22 08:38:30 +00:00
parent fdb05fa330
commit 152af594cc
1 changed files with 7 additions and 3 deletions

View File

@ -612,9 +612,9 @@ Arguments:
the image to be loaded.
SourceSize - The size in bytes of SourceBuffer.
DstBuffer - The buffer to store the image
NumberOfPages - If not NULL, a pointer to the image's page number, if this number
is not enough, return EFI_BUFFER_TOO_SMALL and this parameter contain
the required number.
NumberOfPages - If not NULL, it inputs a pointer to the page number of DstBuffer and outputs
a pointer to the page number of the image. If this number is not enough,
return EFI_BUFFER_TOO_SMALL and this parameter contains the required number.
ImageHandle - Pointer to the returned image handle that is created when the image
is successfully loaded.
EntryPoint - A pointer to the entry point
@ -760,6 +760,10 @@ Returns:
goto Done;
}
if (NumberOfPages != NULL) {
*NumberOfPages = Image->NumberOfPages;
}
//
// Register the image in the Debug Image Info Table if the attribute is set
//