summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-22 08:38:30 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-22 08:38:30 +0000
commit152af594ccbbc581f3c807b609d4ff53dc47f64e (patch)
tree592363926e13752199e2931387a424b5bbe551ae
parentfdb05fa33021288c20e17264b0947a2525e19825 (diff)
downloadedk2-platforms-152af594ccbbc581f3c807b609d4ff53dc47f64e.tar.xz
[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
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 094d837f3c..95528b8996 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -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
//