summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorQiu Shumin <shumin.qiu@intel.com>2016-04-18 15:59:58 +0800
committerQiu Shumin <shumin.qiu@intel.com>2016-04-21 09:28:49 +0800
commitb5e44fbc15085270adfc777c0f2c1890c1e9790f (patch)
treecfbf8ab378451075a27f8d4be7b7e3feea382410 /ShellPkg
parent6b17c11b6f45b4196adb8a9fcbdba5576a0d872b (diff)
downloadedk2-b5e44fbc15085270adfc777c0f2c1890c1e9790f.tar.gz
edk2-b5e44fbc15085270adfc777c0f2c1890c1e9790f.tar.bz2
edk2-b5e44fbc15085270adfc777c0f2c1890c1e9790f.zip
ShellPkg: Support connect a device handle recursively with '-r'.
This patch make Shell 'connect' a device handle recursively with '-r' option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c
index 5d61c2f601..dd3d4a6a27 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c
@@ -2,7 +2,7 @@
Main file for connect shell Driver1 function.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2016, 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
which accompanies this distribution. The full text of the license may be found at
@@ -452,9 +452,10 @@ ShellCommandRunConnect (
//
Count = (gInReconnect?0x4:0x3);
if ((ShellCommandLineGetCount(Package) > Count)
- ||((ShellCommandLineGetFlag(Package, L"-r") || ShellCommandLineGetFlag(Package, L"-c")) && ShellCommandLineGetCount(Package)>1)
+ ||(ShellCommandLineGetFlag(Package, L"-c") && ShellCommandLineGetCount(Package)>1)
+ ||(ShellCommandLineGetFlag(Package, L"-r") && ShellCommandLineGetCount(Package)>2)
||(ShellCommandLineGetFlag(Package, L"-r") && ShellCommandLineGetFlag(Package, L"-c") )
- ){
+ ){
//
// error for too many parameters
//