]> 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 321c366697e3073534a9da962bae315552fe8192..dd3d4a6a27340decd40ba81401ce273dc43c66c0 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Main file for connect shell Driver1 function.\r
 \r
-  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<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