diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-06-16 11:14:40 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-13 20:43:41 +0800 |
commit | 52d6ed6166c463dcd7acc08814bf5b85e212a60a (patch) | |
tree | 6876e7ad036f676bb11d9809b5d868193a5bed3b /ShellPkg | |
parent | 84b0b5edc2394d2489c5f16aff69e0c3f27b47c4 (diff) | |
download | edk2-platforms-52d6ed6166c463dcd7acc08814bf5b85e212a60a.tar.xz |
ShellPkg/UefiHandleParsingLib.c: Unify EOL and remove trailing space
The patch doesn't change any code logic.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit e918029fbce507f7de5b99112582fd41993e58c5)
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 356 |
1 files changed, 173 insertions, 183 deletions
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 408199166d..9789471892 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -244,15 +244,15 @@ GraphicsOutputProtocolDumpInformation( IN CONST BOOLEAN Verbose
)
{
- EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_STATUS Status; - CHAR16 *RetVal; - CHAR16 *Temp; - CHAR16 *Fmt; - CHAR16 *TempRetVal; - UINTN GopInfoSize; - UINT32 Mode; - EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GopInfo; + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
+ EFI_STATUS Status;
+ CHAR16 *RetVal;
+ CHAR16 *Temp;
+ CHAR16 *Fmt;
+ CHAR16 *TempRetVal;
+ UINTN GopInfoSize;
+ UINT32 Mode;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GopInfo;
if (!Verbose) {
return (CatSPrint(NULL, L"GraphicsOutput"));
@@ -299,53 +299,53 @@ GraphicsOutputProtocolDumpInformation( GraphicsOutput->Mode->Info->PixelFormat!=PixelBitMask?0:GraphicsOutput->Mode->Info->PixelInformation.BlueMask
);
- SHELL_FREE_NON_NULL (Temp); - + SHELL_FREE_NON_NULL (Temp);
+
Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_GOP_RES_LIST_MAIN), NULL);
if (Temp == NULL) {
SHELL_FREE_NON_NULL (RetVal);
goto EXIT;
}
- - TempRetVal = CatSPrint (RetVal, Temp); +
+ TempRetVal = CatSPrint (RetVal, Temp);
SHELL_FREE_NON_NULL (RetVal);
if (TempRetVal == NULL) {
goto EXIT;
}
- RetVal = TempRetVal; - SHELL_FREE_NON_NULL (Temp); - + RetVal = TempRetVal;
+ SHELL_FREE_NON_NULL (Temp);
+
Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_GOP_RES_LIST_ENTRY), NULL);
if (Temp == NULL) {
SHELL_FREE_NON_NULL (RetVal);
goto EXIT;
}
- - for (Mode = 0; Mode < GraphicsOutput->Mode->MaxMode; Mode++) { - Status = GraphicsOutput->QueryMode ( - GraphicsOutput, - Mode, - &GopInfoSize, - &GopInfo - ); - if (EFI_ERROR (Status)) { - continue; - } - - TempRetVal = CatSPrint ( - RetVal, - Temp, - Mode, - GopInfo->HorizontalResolution, - GopInfo->VerticalResolution - ); - - SHELL_FREE_NON_NULL (GopInfo); - SHELL_FREE_NON_NULL (RetVal); - RetVal = TempRetVal; - } - +
+ for (Mode = 0; Mode < GraphicsOutput->Mode->MaxMode; Mode++) {
+ Status = GraphicsOutput->QueryMode (
+ GraphicsOutput,
+ Mode,
+ &GopInfoSize,
+ &GopInfo
+ );
+ if (EFI_ERROR (Status)) {
+ continue;
+ }
+
+ TempRetVal = CatSPrint (
+ RetVal,
+ Temp,
+ Mode,
+ GopInfo->HorizontalResolution,
+ GopInfo->VerticalResolution
+ );
+
+ SHELL_FREE_NON_NULL (GopInfo);
+ SHELL_FREE_NON_NULL (RetVal);
+ RetVal = TempRetVal;
+ }
+
EXIT:
SHELL_FREE_NON_NULL(Temp);
@@ -355,134 +355,134 @@ EXIT: }
/**
- Function to dump information about EDID Discovered Protocol. - - This will allocate the return buffer from boot services pool. - - @param[in] TheHandle The handle that has LoadedImage installed. - @param[in] Verbose TRUE for additional information, FALSE otherwise. - - @retval A pointer to a string containing the information. -**/ -CHAR16* -EFIAPI -EdidDiscoveredProtocolDumpInformation ( - IN CONST EFI_HANDLE TheHandle, - IN CONST BOOLEAN Verbose - ) -{ - EFI_EDID_DISCOVERED_PROTOCOL *EdidDiscovered; - EFI_STATUS Status; - CHAR16 *RetVal; - CHAR16 *Temp; - CHAR16 *TempRetVal; - - if (!Verbose) { - return (CatSPrint (NULL, L"EDIDDiscovered")); - } - - Status = gBS->OpenProtocol ( - TheHandle, - &gEfiEdidDiscoveredProtocolGuid, - (VOID**)&EdidDiscovered, - NULL, - NULL, - EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); - - if (EFI_ERROR (Status)) { - return NULL; - } - - Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_DISCOVERED_MAIN), NULL); - if (Temp == NULL) { - return NULL; - } - - RetVal = CatSPrint (NULL, Temp, EdidDiscovered->SizeOfEdid); - SHELL_FREE_NON_NULL (Temp); - - if (EdidDiscovered->SizeOfEdid != 0) { - Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_DISCOVERED_DATA), NULL); - if (Temp == NULL) { - SHELL_FREE_NON_NULL (RetVal); - return NULL; - } - TempRetVal = CatSPrint (RetVal, Temp); - SHELL_FREE_NON_NULL (RetVal); - RetVal = TempRetVal; - - TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid); - RetVal = TempRetVal; - } - return RetVal; -} - -/** - Function to dump information about EDID Active Protocol. - - This will allocate the return buffer from boot services pool. - - @param[in] TheHandle The handle that has LoadedImage installed. - @param[in] Verbose TRUE for additional information, FALSE otherwise. - - @retval A pointer to a string containing the information. -**/ -CHAR16* -EFIAPI -EdidActiveProtocolDumpInformation ( - IN CONST EFI_HANDLE TheHandle, - IN CONST BOOLEAN Verbose - ) -{ - EFI_EDID_ACTIVE_PROTOCOL *EdidActive; - EFI_STATUS Status; - CHAR16 *RetVal; - CHAR16 *Temp; - CHAR16 *TempRetVal; - - if (!Verbose) { - return (CatSPrint (NULL, L"EDIDActive")); - } - - Status = gBS->OpenProtocol ( - TheHandle, - &gEfiEdidActiveProtocolGuid, - (VOID**)&EdidActive, - NULL, - NULL, - EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); - - if (EFI_ERROR (Status)) { - return NULL; - } - - Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_ACTIVE_MAIN), NULL); - if (Temp == NULL) { - return NULL; - } - - RetVal = CatSPrint (NULL, Temp, EdidActive->SizeOfEdid); - SHELL_FREE_NON_NULL (Temp); - - if (EdidActive->SizeOfEdid != 0) { - Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_ACTIVE_DATA), NULL); - if (Temp == NULL) { - SHELL_FREE_NON_NULL (RetVal); - return NULL; - } - TempRetVal = CatSPrint (RetVal, Temp); - SHELL_FREE_NON_NULL (RetVal); - RetVal = TempRetVal; - - TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidActive->SizeOfEdid, EdidActive->Edid); - RetVal = TempRetVal; - } - return RetVal; -} - -/** + Function to dump information about EDID Discovered Protocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has LoadedImage installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A pointer to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+EdidDiscoveredProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_EDID_DISCOVERED_PROTOCOL *EdidDiscovered;
+ EFI_STATUS Status;
+ CHAR16 *RetVal;
+ CHAR16 *Temp;
+ CHAR16 *TempRetVal;
+
+ if (!Verbose) {
+ return (CatSPrint (NULL, L"EDIDDiscovered"));
+ }
+
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiEdidDiscoveredProtocolGuid,
+ (VOID**)&EdidDiscovered,
+ NULL,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+ if (EFI_ERROR (Status)) {
+ return NULL;
+ }
+
+ Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_DISCOVERED_MAIN), NULL);
+ if (Temp == NULL) {
+ return NULL;
+ }
+
+ RetVal = CatSPrint (NULL, Temp, EdidDiscovered->SizeOfEdid);
+ SHELL_FREE_NON_NULL (Temp);
+
+ if (EdidDiscovered->SizeOfEdid != 0) {
+ Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_DISCOVERED_DATA), NULL);
+ if (Temp == NULL) {
+ SHELL_FREE_NON_NULL (RetVal);
+ return NULL;
+ }
+ TempRetVal = CatSPrint (RetVal, Temp);
+ SHELL_FREE_NON_NULL (RetVal);
+ RetVal = TempRetVal;
+
+ TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid);
+ RetVal = TempRetVal;
+ }
+ return RetVal;
+}
+
+/**
+ Function to dump information about EDID Active Protocol.
+
+ This will allocate the return buffer from boot services pool.
+
+ @param[in] TheHandle The handle that has LoadedImage installed.
+ @param[in] Verbose TRUE for additional information, FALSE otherwise.
+
+ @retval A pointer to a string containing the information.
+**/
+CHAR16*
+EFIAPI
+EdidActiveProtocolDumpInformation (
+ IN CONST EFI_HANDLE TheHandle,
+ IN CONST BOOLEAN Verbose
+ )
+{
+ EFI_EDID_ACTIVE_PROTOCOL *EdidActive;
+ EFI_STATUS Status;
+ CHAR16 *RetVal;
+ CHAR16 *Temp;
+ CHAR16 *TempRetVal;
+
+ if (!Verbose) {
+ return (CatSPrint (NULL, L"EDIDActive"));
+ }
+
+ Status = gBS->OpenProtocol (
+ TheHandle,
+ &gEfiEdidActiveProtocolGuid,
+ (VOID**)&EdidActive,
+ NULL,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+ if (EFI_ERROR (Status)) {
+ return NULL;
+ }
+
+ Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_ACTIVE_MAIN), NULL);
+ if (Temp == NULL) {
+ return NULL;
+ }
+
+ RetVal = CatSPrint (NULL, Temp, EdidActive->SizeOfEdid);
+ SHELL_FREE_NON_NULL (Temp);
+
+ if (EdidActive->SizeOfEdid != 0) {
+ Temp = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN (STR_EDID_ACTIVE_DATA), NULL);
+ if (Temp == NULL) {
+ SHELL_FREE_NON_NULL (RetVal);
+ return NULL;
+ }
+ TempRetVal = CatSPrint (RetVal, Temp);
+ SHELL_FREE_NON_NULL (RetVal);
+ RetVal = TempRetVal;
+
+ TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidActive->SizeOfEdid, EdidActive->Edid);
+ RetVal = TempRetVal;
+ }
+ return RetVal;
+}
+
+/**
Function to dump information about PciRootBridgeIo.
This will allocate the return buffer from boot services pool.
@@ -980,7 +980,7 @@ AdapterInformationDumpInformation ( RetVal,
TempStr,
((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *)InformationBlock)->Ipv6Support
- );
+ );
SHELL_FREE_NON_NULL (RetVal);
RetVal = TempRetVal;
} else {
@@ -1478,8 +1478,8 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = { {STRING_TOKEN(STR_ABS_POINTER), &gEfiAbsolutePointerProtocolGuid, NULL},
{STRING_TOKEN(STR_SERIAL_IO), &gEfiSerialIoProtocolGuid, NULL},
{STRING_TOKEN(STR_GRAPHICS_OUTPUT), &gEfiGraphicsOutputProtocolGuid, GraphicsOutputProtocolDumpInformation},
- {STRING_TOKEN(STR_EDID_DISCOVERED), &gEfiEdidDiscoveredProtocolGuid, EdidDiscoveredProtocolDumpInformation}, - {STRING_TOKEN(STR_EDID_ACTIVE), &gEfiEdidActiveProtocolGuid, EdidActiveProtocolDumpInformation}, + {STRING_TOKEN(STR_EDID_DISCOVERED), &gEfiEdidDiscoveredProtocolGuid, EdidDiscoveredProtocolDumpInformation},
+ {STRING_TOKEN(STR_EDID_ACTIVE), &gEfiEdidActiveProtocolGuid, EdidActiveProtocolDumpInformation},
{STRING_TOKEN(STR_EDID_OVERRIDE), &gEfiEdidOverrideProtocolGuid, NULL},
{STRING_TOKEN(STR_CON_IN), &gEfiConsoleInDeviceGuid, NULL},
{STRING_TOKEN(STR_CON_OUT), &gEfiConsoleOutDeviceGuid, NULL},
@@ -2975,7 +2975,7 @@ GetHandleListByProtocolList ( }
//
- // No handles were found...
+ // No handles were found...
//
if (TotalSize == sizeof(EFI_HANDLE)) {
return (NULL);
@@ -3013,13 +3013,3 @@ GetHandleListByProtocolList ( return (HandleList);
}
-
-
-
-
-
-
-
-
-
-
|