From 477a79e1eb9cb9fbb035c633bc06144e5e87baed Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Tue, 5 Aug 2014 23:17:18 +0000 Subject: [PATCH] Updates the logic to allow devices to support SFO output mode Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15760 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UefiShellDriver1CommandsLib/Devices.c | 52 ++++++++++++------ .../UefiShellDriver1CommandsLib.uni | Bin 69812 -> 70038 bytes 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c index 7998bde8c6..afabc8a698 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c @@ -1,7 +1,7 @@ /** @file Main file for devices shell Driver1 function. - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
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 @@ -203,8 +203,11 @@ ShellCommandRunDevices ( // // Print Header + // only in non SFO mode. // - ShellPrintHiiEx(-1, -1, Language, STRING_TOKEN (STR_DEVICES_HEADER_LINES), gShellDriver1HiiHandle); + if (!ShellCommandLineGetFlag(Package, L"-sfo")){ + ShellPrintHiiEx(-1, -1, Language, STRING_TOKEN (STR_DEVICES_HEADER_LINES), gShellDriver1HiiHandle); + } // // loop through each handle @@ -222,20 +225,37 @@ ShellCommandRunDevices ( Name = NULL; Status = GetDeviceHandleInfo(*HandleListWalker, &Type, &Cfg, &Diag, &Parents, &Devices, &Children, &Name, Language); if (Name != NULL && (Parents != 0 || Devices != 0 || Children != 0)) { - ShellPrintHiiEx( - -1, - -1, - Language, - STRING_TOKEN (STR_DEVICES_ITEM_LINE), - gShellDriver1HiiHandle, - ConvertHandleToHandleIndex(*HandleListWalker), - Type, - Cfg?L'X':L'-', - Diag?L'X':L'-', - Parents, - Devices, - Children, - Name!=NULL?Name:L""); + if (!ShellCommandLineGetFlag(Package, L"-sfo")){ + ShellPrintHiiEx( + -1, + -1, + Language, + STRING_TOKEN(STR_DEVICES_ITEM_LINE), + gShellDriver1HiiHandle, + ConvertHandleToHandleIndex(*HandleListWalker), + Type, + Cfg?L'X':L'-', + Diag?L'X':L'-', + Parents, + Devices, + Children, + Name != NULL ? Name : L""); + } else { + ShellPrintHiiEx( + -1, + -1, + Language, + STRING_TOKEN(STR_DEVICES_ITEM_LINE_SFO), + gShellDriver1HiiHandle, + ConvertHandleToHandleIndex(*HandleListWalker), + Type, + Cfg?L'Y':L'N', + Diag?L'Y':L'N', + Parents, + Devices, + Children, + Name != NULL ? Name : L""); + } } if (Name != NULL) { FreePool(Name); diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni index 1c6d9f6d5b29a44c0ec6aae124c967b40fe16d23..a7c787e01ba7005210a8eada846f5c0bdc9d5ad8 100644 GIT binary patch delta 82 zcmdn8kY(CpmJK!9lXqz;Os>(>6Ha9)W5{GkW=LfyX7FUlV@PAjpR8>pJ^7KIoVXD~ c3WE-V0)r|83Tv{UzWC$?T2h;9v@M