ShellPkg/HandleParsingLib: Open LoadedImageProtocol first
This patch changes the order of operations to make sure we can open the LoadedImageProtocol before getting the format string. This should not affect functionality, and makes the next patch easier to review. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
@ -177,13 +177,6 @@ LoadedImageProtocolDumpInformation(
|
||||
return (CatSPrint(NULL, L"LoadedImage"));
|
||||
}
|
||||
|
||||
HandleParsingHiiInit();
|
||||
|
||||
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_LI_DUMP_MAIN), NULL);
|
||||
if (Temp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
TheHandle,
|
||||
&gEfiLoadedImageProtocolGuid,
|
||||
@ -194,7 +187,13 @@ LoadedImageProtocolDumpInformation(
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
SHELL_FREE_NON_NULL (Temp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HandleParsingHiiInit();
|
||||
|
||||
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_LI_DUMP_MAIN), NULL);
|
||||
if (Temp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user