]> git.proxmox.com Git - mirror_edk2.git/blame - 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
CommitLineData
5d73d92f 1/** @file\r
2 Tools of clarify the content of the smbios table.\r
3\r
3737ac2b 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
5d73d92f 5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include "../UefiShellDebug1CommandsLib.h"\r
16#include "LibSmbiosView.h"\r
a1d4bfcc 17#include "SmbiosView.h"\r
5d73d92f 18#include "PrintInfo.h"\r
19#include "QueryTable.h"\r
20\r
21UINT8 gShowType = SHOW_DETAIL;\r
22STATIC STRUCTURE_STATISTICS *mStatisticsTable = NULL;\r
23\r
24UINT8 SmbiosMajorVersion;\r
25UINT8 SmbiosMinorVersion;\r
26\r
27STATIC CONST SHELL_PARAM_ITEM ParamList[] = {\r
28 {L"-t", TypeValue},\r
29 {L"-h", TypeValue},\r
30 {L"-s", TypeFlag},\r
31 {L"-a", TypeFlag},\r
32 {NULL, TypeMax}\r
33 };\r
34\r
a1d4bfcc 35/**\r
36 Function for 'smbiosview' command.\r
37\r
38 @param[in] ImageHandle Handle to the Image (NULL if Internal).\r
39 @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r
40**/\r
5d73d92f 41SHELL_STATUS\r
42EFIAPI\r
43ShellCommandRunSmbiosView (\r
44 IN EFI_HANDLE ImageHandle,\r
45 IN EFI_SYSTEM_TABLE *SystemTable\r
46 )\r
47{\r
48 UINT8 StructType;\r
49 UINT16 StructHandle;\r
50 EFI_STATUS Status;\r
51 BOOLEAN RandomView;\r
52 LIST_ENTRY *Package;\r
53 CHAR16 *ProblemParam;\r
54 SHELL_STATUS ShellStatus;\r
55 CONST CHAR16 *Temp;\r
56\r
57 mStatisticsTable = NULL;\r
58 Package = NULL;\r
59 ShellStatus = SHELL_SUCCESS;\r
60\r
3737ac2b 61 Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);\r
5d73d92f 62 if (EFI_ERROR(Status)) {\r
63 if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
64 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, ProblemParam);\r
65 FreePool(ProblemParam);\r
66 ShellStatus = SHELL_INVALID_PARAMETER;\r
67 } else {\r
68 ASSERT(FALSE);\r
69 }\r
70 } else {\r
71 if (ShellCommandLineGetCount(Package) > 1) {\r
72 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);\r
73 ShellStatus = SHELL_INVALID_PARAMETER;\r
980d554e 74 } else if (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetValue(Package, L"-t") == NULL) {\r
75 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"-t");\r
76 ShellStatus = SHELL_INVALID_PARAMETER;\r
77 } else if (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetValue(Package, L"-h") == NULL) {\r
78 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"-h");\r
79 ShellStatus = SHELL_INVALID_PARAMETER;\r
3737ac2b 80 } else if (\r
81 (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-h")) ||\r
82 (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-s")) ||\r
83 (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-a")) ||\r
84 (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-s")) ||\r
85 (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-a")) ||\r
86 (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-a"))\r
87 ) {\r
88 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);\r
89 ShellStatus = SHELL_INVALID_PARAMETER;\r
5d73d92f 90 } else {\r
91\r
92 //\r
93 // Init Lib\r
3737ac2b 94 \r
5d73d92f 95 Status = LibSmbiosInit ();\r
96 if (EFI_ERROR (Status)) {\r
97 ShellStatus = SHELL_NOT_FOUND;\r
98 goto Done;\r
99 }\r
100 //\r
101 // build statistics table\r
102 //\r
103 Status = InitSmbiosTableStatistics ();\r
104 if (EFI_ERROR (Status)) {\r
105 ShellStatus = SHELL_NOT_FOUND;\r
106 goto Done;\r
107 }\r
108\r
109 StructType = STRUCTURE_TYPE_RANDOM;\r
110 RandomView = TRUE;\r
111 //\r
112 // Initialize the StructHandle to be the first handle\r
113 //\r
114 StructHandle = STRUCTURE_HANDLE_INVALID;\r
115 LibGetSmbiosStructure (&StructHandle, NULL, NULL);\r
116\r
117 Temp = ShellCommandLineGetValue(Package, L"-t");\r
118 if (Temp != NULL) {\r
119 StructType = (UINT8) ShellStrToUintn (Temp);\r
120 }\r
121\r
122 Temp = ShellCommandLineGetValue(Package, L"-h");\r
123 if (Temp != NULL) {\r
124 RandomView = FALSE;\r
125 StructHandle = (UINT16) ShellStrToUintn(Temp);\r
126 }\r
127\r
128 if (ShellCommandLineGetFlag(Package, L"-s")) {\r
129 Status = DisplayStatisticsTable (SHOW_DETAIL);\r
130 if (EFI_ERROR(Status)) {\r
131 ShellStatus = SHELL_NOT_FOUND;\r
132 }\r
133 goto Done;\r
134 }\r
135\r
136 if (ShellCommandLineGetFlag(Package, L"-a")) {\r
137 gShowType = SHOW_ALL;\r
138 }\r
139 //\r
140 // Show SMBIOS structure information\r
141 //\r
142 Status = SMBiosView (StructType, StructHandle, gShowType, RandomView);\r
143 if (EFI_ERROR(Status)) {\r
144 ShellStatus = SHELL_NOT_FOUND;\r
145 }\r
146 }\r
147 }\r
148Done:\r
149 //\r
150 // Release resources\r
151 //\r
152 if (mStatisticsTable != NULL) {\r
153 //\r
154 // Release statistics table\r
155 //\r
156 FreePool (mStatisticsTable);\r
157 mStatisticsTable = NULL;\r
158 }\r
159\r
160 if (Package != NULL) {\r
161 ShellCommandLineFreeVarList (Package);\r
162 }\r
163\r
164 LibSmbiosCleanup ();\r
165\r
166 return ShellStatus;\r
167}\r
168\r
169/**\r
170 Query all structures Data from SMBIOS table and Display\r
171 the information to users as required display option.\r
172\r
173 @param[in] QueryType Structure type to view.\r
174 @param[in] QueryHandle Structure handle to view.\r
175 @param[in] Option Display option: none,outline,normal,detail.\r
176 @param[in] RandomView Support for -h parameter.\r
177\r
178 @retval EFI_SUCCESS print is successful.\r
179 @retval EFI_BAD_BUFFER_SIZE structure is out of the range of SMBIOS table.\r
180**/\r
181EFI_STATUS\r
182EFIAPI\r
183SMBiosView (\r
184 IN UINT8 QueryType,\r
185 IN UINT16 QueryHandle,\r
186 IN UINT8 Option,\r
187 IN BOOLEAN RandomView\r
188 )\r
189{\r
190 UINT16 Handle;\r
191 UINT8 Buffer[1024];\r
192 //\r
193 // bigger than SMBIOS_STRUCTURE_TABLE.MaxStructureSize\r
194 //\r
195 UINT16 Length;\r
196 UINTN Index;\r
197 UINT16 Offset;\r
198 //\r
199 // address offset from structure table head.\r
200 //\r
201 UINT32 TableHead;\r
202 //\r
203 // structure table head.\r
204 //\r
205\r
a1d4bfcc 206 SMBIOS_STRUCTURE_POINTER SmbiosStruct;\r
5d73d92f 207 SMBIOS_STRUCTURE_TABLE *SMBiosTable;\r
208\r
209 SMBiosTable = NULL;\r
210 LibSmbiosGetEPS (&SMBiosTable);\r
211 if (SMBiosTable == NULL) {\r
212 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gShellDebug1HiiHandle);\r
213 return EFI_BAD_BUFFER_SIZE;\r
214 }\r
215\r
216 if (CompareMem (SMBiosTable->AnchorString, "_SM_", 4) == 0) {\r
217 //\r
218 // Have get SMBIOS table\r
219 //\r
220 SmbiosPrintEPSInfo (SMBiosTable, Option);\r
221\r
222 SmbiosMajorVersion = SMBiosTable->MajorVersion;\r
223 SmbiosMinorVersion = SMBiosTable->MinorVersion;\r
224\r
225 ShellPrintEx(-1,-1,L"=========================================================\n");\r
226 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERY_STRUCT_COND), gShellDebug1HiiHandle);\r
227\r
228 if (QueryType == STRUCTURE_TYPE_RANDOM) {\r
229 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE_RANDOM), gShellDebug1HiiHandle);\r
230 } else {\r
231 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE), gShellDebug1HiiHandle, QueryType);\r
232 }\r
233\r
234 if (RandomView) {\r
235 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE_RANDOM), gShellDebug1HiiHandle);\r
236 } else {\r
237 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE), gShellDebug1HiiHandle, QueryHandle);\r
238 }\r
239\r
240 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOWTYPE), gShellDebug1HiiHandle);\r
241 ShellPrintEx(-1,-1,GetShowTypeString (gShowType));\r
242 ShellPrintEx(-1,-1,L"\n\n");\r
243\r
244/*\r
245 //\r
246 // Get internal commands, such as change options.\r
247 //\r
248 Status = WaitEnter ();\r
249 if (EFI_ERROR (Status)) {\r
250 if (Status == EFI_ABORTED) {\r
251 return EFI_SUCCESS;\r
252 }\r
253\r
254 return Status;\r
255 }\r
256*/\r
257\r
258 //\r
259 // Searching and display structure info\r
260 //\r
261 Handle = QueryHandle;\r
262 TableHead = SMBiosTable->TableAddress;\r
263 Offset = 0;\r
264 for (Index = 0; Index < SMBiosTable->NumberOfSmbiosStructures; Index++) {\r
265 //\r
266 // if reach the end of table, break..\r
267 //\r
268 if (Handle == STRUCTURE_HANDLE_INVALID) {\r
269 break;\r
270 }\r
271 //\r
272 // handle then point to the next!\r
273 //\r
274 if (LibGetSmbiosStructure (&Handle, Buffer, &Length) != DMI_SUCCESS) {\r
275 break;\r
276 }\r
277 Offset = (UINT16) (Offset + Length);\r
a1d4bfcc 278 SmbiosStruct.Raw = Buffer;\r
5d73d92f 279\r
280 //\r
281 // if QueryType==Random, print this structure.\r
282 // if QueryType!=Random, but Hdr->Type==QueryType, also print it.\r
283 // only if QueryType != Random and Hdr->Type != QueryType, skiped it.\r
284 //\r
a1d4bfcc 285 if (QueryType != STRUCTURE_TYPE_RANDOM && SmbiosStruct.Hdr->Type != QueryType) {\r
5d73d92f 286 continue;\r
287 }\r
288\r
289 ShellPrintEx(-1,-1,L"\n=========================================================\n");\r
290 ShellPrintHiiEx(-1,-1,NULL,\r
291 STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT),\r
292 gShellDebug1HiiHandle,\r
a1d4bfcc 293 SmbiosStruct.Hdr->Type,\r
294 SmbiosStruct.Hdr->Handle\r
5d73d92f 295 );\r
296 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), gShellDebug1HiiHandle, Index, Length);\r
297 //\r
298 // Addr of structure in structure in table\r
299 //\r
300 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ADDR), gShellDebug1HiiHandle, TableHead + Offset);\r
301 DumpHex (0, 0, Length, Buffer);\r
302\r
303/*\r
304 //\r
305 // Get internal commands, such as change options.\r
306 //\r
307 Status = WaitEnter ();\r
308 if (EFI_ERROR (Status)) {\r
309 if (Status == EFI_ABORTED) {\r
310 return EFI_SUCCESS;\r
311 }\r
312\r
313 return Status;\r
314 }\r
315*/\r
316\r
317 if (gShowType != SHOW_NONE) {\r
318 //\r
319 // check structure legality\r
320 //\r
a1d4bfcc 321 SmbiosCheckStructure (&SmbiosStruct);\r
5d73d92f 322\r
323 //\r
324 // Print structure information\r
325 //\r
a1d4bfcc 326 SmbiosPrintStructure (&SmbiosStruct, gShowType);\r
5d73d92f 327 ShellPrintEx(-1,-1,L"\n");\r
328\r
329/*\r
330 //\r
331 // Get internal commands, such as change options.\r
332 //\r
333 Status = WaitEnter ();\r
334 if (EFI_ERROR (Status)) {\r
335 if (Status == EFI_ABORTED) {\r
336 return EFI_SUCCESS;\r
337 }\r
338\r
339 return Status;\r
340 }\r
341*/\r
342 }\r
343 if (!RandomView) {\r
344 break;\r
345 }\r
346 }\r
347\r
348 ShellPrintEx(-1,-1,L"\n=========================================================\n");\r
349 return EFI_SUCCESS;\r
350 }\r
351\r
352 return EFI_BAD_BUFFER_SIZE;\r
353}\r
354\r
355/**\r
356 Function to initialize the global mStatisticsTable object.\r
357\r
358 @retval EFI_SUCCESS print is successful.\r
359**/\r
360EFI_STATUS\r
361EFIAPI\r
362InitSmbiosTableStatistics (\r
363 VOID\r
364 )\r
365{\r
366 UINT16 Handle;\r
367 UINT8 Buffer[1024];\r
368 UINT16 Length;\r
369 UINT16 Offset;\r
370 UINT16 Index;\r
371\r
a1d4bfcc 372 SMBIOS_STRUCTURE_POINTER SmbiosStruct;\r
5d73d92f 373 SMBIOS_STRUCTURE_TABLE *SMBiosTable;\r
a1d4bfcc 374 STRUCTURE_STATISTICS *StatisticsPointer;\r
5d73d92f 375\r
376 SMBiosTable = NULL;\r
377 LibSmbiosGetEPS (&SMBiosTable);\r
378 if (SMBiosTable == NULL) {\r
379 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gShellDebug1HiiHandle);\r
380 return EFI_NOT_FOUND;\r
381 }\r
382\r
383 if (CompareMem (SMBiosTable->AnchorString, "_SM_", 4) != 0) {\r
384 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE), gShellDebug1HiiHandle);\r
385 return EFI_INVALID_PARAMETER;\r
386 }\r
387 //\r
388 // Allocate memory to mStatisticsTable\r
389 //\r
390 if (mStatisticsTable != NULL) {\r
391 FreePool (mStatisticsTable);\r
392 mStatisticsTable = NULL;\r
393 }\r
394\r
3737ac2b 395 mStatisticsTable = (STRUCTURE_STATISTICS *) AllocateZeroPool (SMBiosTable->NumberOfSmbiosStructures * sizeof (STRUCTURE_STATISTICS));\r
5d73d92f 396\r
397 if (mStatisticsTable == NULL) {\r
398 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM), gShellDebug1HiiHandle);\r
399 return EFI_OUT_OF_RESOURCES;\r
400 }\r
401\r
402 Offset = 0;\r
a1d4bfcc 403 StatisticsPointer = mStatisticsTable;\r
5d73d92f 404\r
405 //\r
406 // search from the first one\r
407 //\r
408 Handle = STRUCTURE_HANDLE_INVALID;\r
409 LibGetSmbiosStructure (&Handle, NULL, NULL);\r
410 for (Index = 1; Index <= SMBiosTable->NumberOfSmbiosStructures; Index++) {\r
411 //\r
412 // If reach the end of table, break..\r
413 //\r
414 if (Handle == STRUCTURE_HANDLE_INVALID) {\r
415 break;\r
416 }\r
417 //\r
418 // After LibGetSmbiosStructure(), handle then point to the next!\r
419 //\r
420 if (LibGetSmbiosStructure (&Handle, Buffer, &Length) != DMI_SUCCESS) {\r
421 break;\r
422 }\r
423\r
a1d4bfcc 424 SmbiosStruct.Raw = Buffer;\r
5d73d92f 425 Offset = (UINT16) (Offset + Length);\r
426\r
427 //\r
428 // general statistics\r
429 //\r
a1d4bfcc 430 StatisticsPointer->Index = Index;\r
431 StatisticsPointer->Type = SmbiosStruct.Hdr->Type;\r
432 StatisticsPointer->Handle = SmbiosStruct.Hdr->Handle;\r
433 StatisticsPointer->Length = Length;\r
434 StatisticsPointer->Addr = Offset;\r
5d73d92f 435\r
a1d4bfcc 436 StatisticsPointer = &mStatisticsTable[Index];\r
5d73d92f 437 }\r
438\r
439 return EFI_SUCCESS;\r
440}\r
441\r
442/**\r
443 Function to display the global mStatisticsTable object.\r
444\r
445 @param[in] Option ECHO, NORMAL, or DETAIL control the amount of detail displayed.\r
446\r
447 @retval EFI_SUCCESS print is successful.\r
448**/\r
449EFI_STATUS\r
450EFIAPI\r
451DisplayStatisticsTable (\r
452 IN UINT8 Option\r
453 )\r
454{\r
455 UINTN Index;\r
456 UINTN Num;\r
a1d4bfcc 457 STRUCTURE_STATISTICS *StatisticsPointer;\r
5d73d92f 458 SMBIOS_STRUCTURE_TABLE *SMBiosTable;\r
459\r
460 SMBiosTable = NULL;\r
461 if (Option < SHOW_OUTLINE) {\r
462 return EFI_SUCCESS;\r
463 }\r
464 //\r
465 // display EPS information firstly\r
466 //\r
467 LibSmbiosGetEPS (&SMBiosTable);\r
468 if (SMBiosTable == NULL) {\r
469 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gShellDebug1HiiHandle);\r
470 return EFI_UNSUPPORTED;\r
471 }\r
472\r
473 ShellPrintEx(-1,-1,L"\n============================================================\n");\r
474 SmbiosPrintEPSInfo (SMBiosTable, Option);\r
475\r
476 if (Option < SHOW_NORMAL) {\r
477 return EFI_SUCCESS;\r
478 }\r
479\r
480 if (mStatisticsTable == NULL) {\r
481 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_STATS), gShellDebug1HiiHandle);\r
482 return EFI_NOT_FOUND;\r
483 }\r
484\r
485 ShellPrintEx(-1,-1,L"============================================================\n");\r
a1d4bfcc 486 StatisticsPointer = &mStatisticsTable[0];\r
5d73d92f 487 Num = SMBiosTable->NumberOfSmbiosStructures;\r
488 //\r
489 // display statistics table content\r
490 //\r
491 for (Index = 1; Index <= Num; Index++) {\r
a1d4bfcc 492 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gShellDebug1HiiHandle, StatisticsPointer->Index);\r
493 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gShellDebug1HiiHandle, StatisticsPointer->Type);\r
494 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gShellDebug1HiiHandle, StatisticsPointer->Handle);\r
5d73d92f 495 if (Option >= SHOW_DETAIL) {\r
a1d4bfcc 496 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gShellDebug1HiiHandle, StatisticsPointer->Addr);\r
497 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gShellDebug1HiiHandle, StatisticsPointer->Length);\r
5d73d92f 498 }\r
499\r
500 ShellPrintEx(-1,-1,L"\n");\r
a1d4bfcc 501 StatisticsPointer = &mStatisticsTable[Index];\r
5d73d92f 502/*\r
503 //\r
504 // Display 20 lines and wait for a page break\r
505 //\r
506 if (Index % 20 == 0) {\r
507 ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTER_CONTINUE), gShellDebug1HiiHandle);\r
508 Status = WaitEnter ();\r
509 if (EFI_ERROR (Status)) {\r
510 if (Status == EFI_ABORTED) {\r
511 return EFI_SUCCESS;\r
512 }\r
513\r
514 return Status;\r
515 }\r
516 }\r
517*/\r
518 }\r
519\r
520 return EFI_SUCCESS;\r
521}\r
522\r
523/**\r
524 function to return a string of the detail level.\r
525\r
526 @param[in] ShowType The detail level whose name is desired in clear text.\r
527\r
528 @return A pointer to a string representing the ShowType (or 'undefined type' if not known).\r
529**/\r
530CHAR16 *\r
531EFIAPI\r
532GetShowTypeString (\r
533 UINT8 ShowType\r
534 )\r
535{\r
536 //\r
537 // show type\r
538 //\r
539 switch (ShowType) {\r
540\r
541 case SHOW_NONE:\r
542 return L"SHOW_NONE";\r
543\r
544 case SHOW_OUTLINE:\r
545 return L"SHOW_OUTLINE";\r
546\r
547 case SHOW_NORMAL:\r
548 return L"SHOW_NORMAL";\r
549\r
550 case SHOW_DETAIL:\r
551 return L"SHOW_DETAIL";\r
552\r
553 case SHOW_ALL:\r
554 return L"SHOW_ALL";\r
555\r
556 default:\r
557 return L"Undefined type";\r
558 }\r
559}\r
560\r
561/*\r
562EFI_STATUS\r
563InitializeSmbiosViewApplicationGetLineHelp (\r
564 OUT CHAR16 **Str\r
565 )\r
566{\r
567 return LibCmdGetStringByToken (STRING_ARRAY_NAME, &EfiSmbiosViewGuid, STRING_TOKEN (STR_SMBIOSVIEW_LINE_HELP), Str);\r
568}\r
569*/\r