]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
add comments to function declarations and definitions and updated to match coding...
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / SmbiosView.c
index b59109c455b2aedc755c773c4f2578c49cb56557..b280306695fcb18474bbad176bca4c7a33d892cd 100644 (file)
@@ -14,7 +14,7 @@
 \r
 #include "../UefiShellDebug1CommandsLib.h"\r
 #include "LibSmbiosView.h"\r
-#include "smbiosview.h"\r
+#include "SmbiosView.h"\r
 #include "PrintInfo.h"\r
 #include "QueryTable.h"\r
 \r
@@ -32,6 +32,12 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
   {NULL, TypeMax}\r
   };\r
 \r
+/**\r
+  Function for 'smbiosview' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunSmbiosView (\r
@@ -197,7 +203,7 @@ SMBiosView (
   // structure table head.\r
   //\r
 \r
-  SMBIOS_STRUCTURE_POINTER  pStruct;\r
+  SMBIOS_STRUCTURE_POINTER  SmbiosStruct;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
@@ -269,14 +275,14 @@ SMBiosView (
         break;\r
       }\r
       Offset      = (UINT16) (Offset + Length);\r
-      pStruct.Raw = Buffer;\r
+      SmbiosStruct.Raw = Buffer;\r
 \r
       //\r
       // if QueryType==Random, print this structure.\r
       // if QueryType!=Random, but Hdr->Type==QueryType, also print it.\r
       // only if QueryType != Random and Hdr->Type != QueryType, skiped it.\r
       //\r
-      if (QueryType != STRUCTURE_TYPE_RANDOM && pStruct.Hdr->Type != QueryType) {\r
+      if (QueryType != STRUCTURE_TYPE_RANDOM && SmbiosStruct.Hdr->Type != QueryType) {\r
         continue;\r
       }\r
 \r
@@ -284,8 +290,8 @@ SMBiosView (
       ShellPrintHiiEx(-1,-1,NULL,\r
         STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT),\r
         gShellDebug1HiiHandle,\r
-        pStruct.Hdr->Type,\r
-        pStruct.Hdr->Handle\r
+        SmbiosStruct.Hdr->Type,\r
+        SmbiosStruct.Hdr->Handle\r
        );\r
       ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), gShellDebug1HiiHandle, Index, Length);\r
       //\r
@@ -312,12 +318,12 @@ SMBiosView (
         //\r
         // check structure legality\r
         //\r
-        SmbiosCheckStructure (&pStruct);\r
+        SmbiosCheckStructure (&SmbiosStruct);\r
 \r
         //\r
         // Print structure information\r
         //\r
-        SmbiosPrintStructure (&pStruct, gShowType);\r
+        SmbiosPrintStructure (&SmbiosStruct, gShowType);\r
         ShellPrintEx(-1,-1,L"\n");\r
 \r
 /*\r
@@ -363,9 +369,9 @@ InitSmbiosTableStatistics (
   UINT16                    Offset;\r
   UINT16                    Index;\r
 \r
-  SMBIOS_STRUCTURE_POINTER  pStruct;\r
+  SMBIOS_STRUCTURE_POINTER  SmbiosStruct;\r
   SMBIOS_STRUCTURE_TABLE    *SMBiosTable;\r
-  STRUCTURE_STATISTICS      *pStatistics;\r
+  STRUCTURE_STATISTICS      *StatisticsPointer;\r
 \r
   SMBiosTable = NULL;\r
   LibSmbiosGetEPS (&SMBiosTable);\r
@@ -394,7 +400,7 @@ InitSmbiosTableStatistics (
   }\r
 \r
   Offset      = 0;\r
-  pStatistics = mStatisticsTable;\r
+  StatisticsPointer = mStatisticsTable;\r
 \r
   //\r
   // search from the first one\r
@@ -415,19 +421,19 @@ InitSmbiosTableStatistics (
       break;\r
     }\r
 \r
-    pStruct.Raw = Buffer;\r
+    SmbiosStruct.Raw = Buffer;\r
     Offset      = (UINT16) (Offset + Length);\r
 \r
     //\r
     // general statistics\r
     //\r
-    pStatistics->Index  = Index;\r
-    pStatistics->Type   = pStruct.Hdr->Type;\r
-    pStatistics->Handle = pStruct.Hdr->Handle;\r
-    pStatistics->Length = Length;\r
-    pStatistics->Addr   = Offset;\r
+    StatisticsPointer->Index  = Index;\r
+    StatisticsPointer->Type   = SmbiosStruct.Hdr->Type;\r
+    StatisticsPointer->Handle = SmbiosStruct.Hdr->Handle;\r
+    StatisticsPointer->Length = Length;\r
+    StatisticsPointer->Addr   = Offset;\r
 \r
-    pStatistics         = &mStatisticsTable[Index];\r
+    StatisticsPointer         = &mStatisticsTable[Index];\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -448,7 +454,7 @@ DisplayStatisticsTable (
 {\r
   UINTN                   Index;\r
   UINTN                   Num;\r
-  STRUCTURE_STATISTICS    *pStatistics;\r
+  STRUCTURE_STATISTICS    *StatisticsPointer;\r
   SMBIOS_STRUCTURE_TABLE  *SMBiosTable;\r
 \r
   SMBiosTable = NULL;\r
@@ -477,22 +483,22 @@ DisplayStatisticsTable (
   }\r
 \r
   ShellPrintEx(-1,-1,L"============================================================\n");\r
-  pStatistics = &mStatisticsTable[0];\r
+  StatisticsPointer = &mStatisticsTable[0];\r
   Num         = SMBiosTable->NumberOfSmbiosStructures;\r
   //\r
   // display statistics table content\r
   //\r
   for (Index = 1; Index <= Num; Index++) {\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gShellDebug1HiiHandle, pStatistics->Index);\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gShellDebug1HiiHandle, pStatistics->Type);\r
-    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gShellDebug1HiiHandle, pStatistics->Handle);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gShellDebug1HiiHandle, StatisticsPointer->Index);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gShellDebug1HiiHandle, StatisticsPointer->Type);\r
+    ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gShellDebug1HiiHandle, StatisticsPointer->Handle);\r
     if (Option >= SHOW_DETAIL) {\r
-      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gShellDebug1HiiHandle, pStatistics->Addr);\r
-      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gShellDebug1HiiHandle, pStatistics->Length);\r
+      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gShellDebug1HiiHandle, StatisticsPointer->Addr);\r
+      ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gShellDebug1HiiHandle, StatisticsPointer->Length);\r
     }\r
 \r
     ShellPrintEx(-1,-1,L"\n");\r
-    pStatistics = &mStatisticsTable[Index];\r
+    StatisticsPointer = &mStatisticsTable[Index];\r
 /*\r
     //\r
     // Display 20 lines and wait for a page break\r