summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorTapan Shah <tapandshah@hp.com>2014-08-29 20:34:34 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-29 20:34:34 +0000
commitbbe94d7ab3cc7d0a3c3f00ef7aa1fc019baf09d5 (patch)
treeafa4e36def8530e3df1b6ff97572e6ae8ac53a4f /ShellPkg
parentb7cd151207602029a4985802c7a7998d21e8a6a0 (diff)
Add CTRL+C support for ‘devtree’ command.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hp.com> Reviewed-By: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15993 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c
index 154877037..d950c8d6c 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c
@@ -1,6 +1,7 @@
/** @file
Main file for DevTree shell Driver1 function.
+ Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 2012, 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
@@ -57,6 +58,12 @@ DoDevTreeForHandle(
ChildCount = 0;
ASSERT(TheHandle != NULL);
+
+ if (ShellGetExecutionBreakFlag()) {
+ ShellStatus = SHELL_ABORTED;
+ return ShellStatus;
+ }
+
//
// We want controller handles. they will not have LoadedImage or DriverBinding (or others...)
//
@@ -119,6 +126,9 @@ DoDevTreeForHandle(
ParseHandleDatabaseForChildControllers(TheHandle, &ChildCount, &ChildHandleBuffer);
for (LoopVar = 0 ; LoopVar < ChildCount && ShellStatus == SHELL_SUCCESS; LoopVar++){
ShellStatus = DoDevTreeForHandle(ChildHandleBuffer[LoopVar], Lang, UseDevPaths, IndentCharCount+2, HiiString);
+ if (ShellStatus == SHELL_ABORTED) {
+ break;
+ }
}
if (ChildHandleBuffer != NULL) {