]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Support connect a device handle recursively with '-r'.
authorQiu Shumin <shumin.qiu@intel.com>
Mon, 18 Apr 2016 07:59:58 +0000 (15:59 +0800)
committerQiu Shumin <shumin.qiu@intel.com>
Thu, 21 Apr 2016 01:28:49 +0000 (09:28 +0800)
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>
ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c

index 5d61c2f6013ece3a73dde55c7ddb58335d3b1a7e..dd3d4a6a27340decd40ba81401ce273dc43c66c0 100644 (file)
@@ -2,7 +2,7 @@
   Main file for connect shell Driver1 function.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2016, 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
@@ -452,9 +452,10 @@ ShellCommandRunConnect (
     //\r
     Count = (gInReconnect?0x4:0x3);\r
     if ((ShellCommandLineGetCount(Package) > Count)\r
-      ||((ShellCommandLineGetFlag(Package, L"-r") || ShellCommandLineGetFlag(Package, L"-c")) && ShellCommandLineGetCount(Package)>1)\r
+      ||(ShellCommandLineGetFlag(Package, L"-c") && ShellCommandLineGetCount(Package)>1)\r
+      ||(ShellCommandLineGetFlag(Package, L"-r") && ShellCommandLineGetCount(Package)>2)\r
       ||(ShellCommandLineGetFlag(Package, L"-r") && ShellCommandLineGetFlag(Package, L"-c") )\r
-     ){\r
+    ){\r
       //\r
       // error for too many parameters\r
       //\r