/** @file\r
Main file for devices shell Driver1 function.\r
\r
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2012-2014, Hewlett-Packard Development Company, L.P.<BR>\r
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
}\r
\r
STATIC CONST SHELL_PARAM_ITEM ParamList[] = {\r
+ {L"-sfo", TypeFlag},\r
{L"-l", TypeValue},\r
{NULL, TypeMax}\r
};\r
UINTN Children;\r
CHAR16 *Name;\r
CONST CHAR16 *Lang;\r
+ BOOLEAN SfoFlag;\r
\r
ShellStatus = SHELL_SUCCESS;\r
Language = NULL;\r
+ SfoFlag = FALSE;\r
\r
//\r
// initialize the shell lib (we must be in non-auto-init...)\r
\r
//\r
// Print Header\r
+\r
//\r
- ShellPrintHiiEx(-1, -1, Language, STRING_TOKEN (STR_DEVICES_HEADER_LINES), gShellDriver1HiiHandle);\r
+ if (ShellCommandLineGetFlag (Package, L"-sfo")) {\r
+ ShellPrintHiiEx (-1, -1, Language, STRING_TOKEN (STR_GEN_SFO_HEADER), gShellDriver1HiiHandle, L"devices");\r
+ SfoFlag = TRUE;\r
+ } else {\r
+ ShellPrintHiiEx (-1, -1, Language, STRING_TOKEN (STR_DEVICES_HEADER_LINES), gShellDriver1HiiHandle);\r
+ }\r
\r
//\r
// loop through each handle\r
Name = NULL;\r
Status = GetDeviceHandleInfo(*HandleListWalker, &Type, &Cfg, &Diag, &Parents, &Devices, &Children, &Name, Language);\r
if (Name != NULL && (Parents != 0 || Devices != 0 || Children != 0)) {\r
- ShellPrintHiiEx(\r
+ ShellPrintHiiEx (\r
-1,\r
-1,\r
Language,\r
- STRING_TOKEN (STR_DEVICES_ITEM_LINE),\r
+ SfoFlag?STRING_TOKEN (STR_DEVICES_ITEM_LINE_SFO):STRING_TOKEN (STR_DEVICES_ITEM_LINE),\r
gShellDriver1HiiHandle,\r
- ConvertHandleToHandleIndex(*HandleListWalker),\r
+ ConvertHandleToHandleIndex (*HandleListWalker),\r
Type,\r
- Cfg?L'X':L'-',\r
- Diag?L'X':L'-',\r
+ Cfg?(SfoFlag?L'Y':L'X'):(SfoFlag?L'N':L'-'),\r
+ Diag?(SfoFlag?L'Y':L'X'):(SfoFlag?L'N':L'-'),\r
Parents,\r
Devices,\r
Children,\r
if (Name != NULL) {\r
FreePool(Name);\r
}\r
+ if (ShellGetExecutionBreakFlag ()) {\r
+ ShellStatus = SHELL_ABORTED;\r
+ break;\r
+ }\r
+ \r
}\r
\r
if (HandleList != NULL) {\r