]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c
ShellPkg: Support connect a device handle recursively with '-r'.
[mirror_edk2.git] / 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