diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:13:38 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:51 +0800 |
commit | ba0014b9f8ae1a593f03e744f26008214c2b06a8 (patch) | |
tree | d40c0369fe53be8bd4a8c5595b773ec1bf3cf884 /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView | |
parent | 24bfed691d9b581830933623204b56a704d1abd2 (diff) | |
download | edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.zip edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.gz edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.bz2 |
ShellPkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView')
4 files changed, 36 insertions, 36 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c index edfdcc9..bf14ba6 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c @@ -1,7 +1,7 @@ /** @file
API for SMBIOS table.
- Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-
+
#include "UefiShellDebug1CommandsLib.h"
#include <Guid/SmBios.h>
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 7a75554..93c6094 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -1,8 +1,8 @@ /** @file
Module for clarifying the content of the smbios structure element information.
- Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
- (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
+ Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
(C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2892,7 +2892,7 @@ DisplaySBDSManufactureDate ( /**
Display System Reset (Type 23) information.
-
+
Identifies the system-reset capabilities for the system.
Bits 7:6 Reserved for future assignment via this specification, set to 00b.
Bit 5 System contains a watchdog timer, either True (1) or False (0).
@@ -2996,7 +2996,7 @@ DisplaySystemResetCapabilities ( /**
Display Hardware Security (Type 24) information.
-
+
Identifies the password and reset status for the system:
Bits 7:6 Power-on Password Status, one of:
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 3c561ad..b56cd61 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -2,7 +2,7 @@ Build a table, each item is (Key, Info) pair.
And give a interface of query a string out of a table.
- Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -3412,7 +3412,7 @@ QueryTable ( // Check if Key is in the range
// or if Key == Value in the table
//
- if ((High > Low && Key >= Low && Key <= High)
+ if ((High > Low && Key >= Low && Key <= High)
|| (Table[Index].Key == Key)) {
StrnCpyS (Info, InfoLen, Table[Index].Info, InfoLen - 1);
StrnCatS (Info, InfoLen, L"\n", InfoLen - 1 - StrLen(Info));
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c index 6e7c763..e20b207 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c @@ -2,7 +2,7 @@ Tools of clarify the content of the smbios table.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -69,7 +69,7 @@ ShellCommandRunSmbiosView ( Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
if (EFI_ERROR(Status)) {
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
FreePool(ProblemParam);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
@@ -77,13 +77,13 @@ ShellCommandRunSmbiosView ( }
} else {
if (ShellCommandLineGetCount(Package) > 1) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetValue(Package, L"-t") == NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetValue(Package, L"-h") == NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (
(ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-h")) ||
@@ -93,7 +93,7 @@ ShellCommandRunSmbiosView ( (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-a")) ||
(ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-a"))
) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
@@ -103,30 +103,30 @@ ShellCommandRunSmbiosView ( Status1 = LibSmbiosInit ();
Status2 = LibSmbios64BitInit ();
if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) {
- ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
ShellStatus = SHELL_NOT_FOUND;
goto Done;
}
-
+
StructType = STRUCTURE_TYPE_RANDOM;
RandomView = TRUE;
-
+
Temp = ShellCommandLineGetValue(Package, L"-t");
if (Temp != NULL) {
StructType = (UINT8) ShellStrToUintn (Temp);
}
-
+
if (ShellCommandLineGetFlag(Package, L"-a")) {
gShowType = SHOW_ALL;
}
-
+
if (!EFI_ERROR (Status1)) {
//
// Initialize the StructHandle to be the first handle
//
StructHandle = INVALID_HANDLE;
LibGetSmbiosStructure (&StructHandle, NULL, NULL);
-
+
Temp = ShellCommandLineGetValue(Package, L"-h");
if (Temp != NULL) {
RandomView = FALSE;
@@ -140,7 +140,7 @@ ShellCommandRunSmbiosView ( ShellStatus = SHELL_NOT_FOUND;
goto Done;
}
-
+
if (ShellCommandLineGetFlag(Package, L"-s")) {
Status = DisplayStatisticsTable (SHOW_DETAIL);
if (EFI_ERROR(Status)) {
@@ -148,7 +148,7 @@ ShellCommandRunSmbiosView ( }
goto Show64Bit;
}
-
+
//
// Show SMBIOS structure information
//
@@ -174,13 +174,13 @@ Show64Bit: //
StructHandle = INVALID_HANDLE;
LibGetSmbios64BitStructure (&StructHandle, NULL, NULL);
-
+
Temp = ShellCommandLineGetValue(Package, L"-h");
if (Temp != NULL) {
RandomView = FALSE;
StructHandle = (UINT16) ShellStrToUintn(Temp);
}
-
+
if (ShellCommandLineGetFlag(Package, L"-s")) {
Status = DisplaySmbios64BitStatisticsTable (SHOW_DETAIL);
if (EFI_ERROR(Status)) {
@@ -188,7 +188,7 @@ Show64Bit: }
goto Done;
}
-
+
//
// Show SMBIOS structure information
//
@@ -666,7 +666,7 @@ InitSmbiosTableStatistics ( @param[out] NumberOfSmbios64Structures The number of structures in 64-bit SMBIOS table.
@param[out] Smbios64TableLength The total length of 64-bit SMBIOS table.
- @retval EFI_SUCCESS Calculation was successful.
+ @retval EFI_SUCCESS Calculation was successful.
**/
EFI_STATUS
CalculateSmbios64BitStructureCountAndLength (
@@ -677,10 +677,10 @@ CalculateSmbios64BitStructureCountAndLength ( {
SMBIOS_STRUCTURE_POINTER Smbios;
UINT8 *Raw;
-
+
*Smbios64TableLength = 0;
*NumberOfSmbios64Structures = 0;
-
+
Smbios.Raw = (UINT8 *)(UINTN)(Smbios64EntryPoint->TableAddress);
while (TRUE) {
if (Smbios.Hdr->Type == 127) {
@@ -702,11 +702,11 @@ CalculateSmbios64BitStructureCountAndLength ( //
(*Smbios64TableLength) += ((UINTN) Smbios.Raw - (UINTN) Raw);
if ((*Smbios64TableLength) > Smbios64EntryPoint->TableMaximumSize) {
- //
- // The actual table length exceeds maximum table size,
- // There should be something wrong with SMBIOS table.
- //
- return EFI_INVALID_PARAMETER;
+ //
+ // The actual table length exceeds maximum table size,
+ // There should be something wrong with SMBIOS table.
+ //
+ return EFI_INVALID_PARAMETER;
}
(*NumberOfSmbios64Structures)++;
}
@@ -727,7 +727,7 @@ InitSmbios64BitTableStatistics ( UINT16 Length;
UINT16 Offset;
UINT16 Index;
- EFI_STATUS Status;
+ EFI_STATUS Status;
SMBIOS_STRUCTURE_POINTER SmbiosStruct;
SMBIOS_TABLE_3_0_ENTRY_POINT *SMBiosTable;
STRUCTURE_STATISTICS *StatisticsPointer;
@@ -755,9 +755,9 @@ InitSmbios64BitTableStatistics ( //
Status = CalculateSmbios64BitStructureCountAndLength (SMBiosTable, &mNumberOfSmbios64BitStructures, &mSmbios64BitTableLength);
if ((EFI_ERROR (Status)) || (mSmbios64BitTableLength > SMBiosTable->TableMaximumSize)) {
- return EFI_INVALID_PARAMETER;
+ return EFI_INVALID_PARAMETER;
}
-
+
mSmbios64BitStatisticsTable = (STRUCTURE_STATISTICS *) AllocateZeroPool (mNumberOfSmbios64BitStructures * sizeof (STRUCTURE_STATISTICS));
if (mSmbios64BitStatisticsTable == NULL) {
|