]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/ContextTool/org/tianocore/context/ParseParameter.java
To fix EDKT284.
[mirror_edk2.git] / Tools / Source / ContextTool / org / tianocore / context / ParseParameter.java
index d74801e279507a86f7a5296e664968e8bb8f51c1..2285f2142d796ae82e394a9d30dad3d5117f280e 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+  File is ParseParameter class which is used to parse the validity of user's input args\r
+  and standardize them. \r
\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 package org.tianocore.context;\r
 \r
 public class ParseParameter {\r
@@ -21,7 +34,7 @@ public class ParseParameter {
             for(int i=0; i<args.length; i++){\r
                 if( (args[i].compareToIgnoreCase("-h") == 0) || \r
                     (args[i].startsWith("-") && ((args[i].charAt(1) != 'a') && (args[i].charAt(1) != 'c') \r
-                    && (args[i].charAt(1) != 'n') && (args[i].charAt(1) != 'p') && (args[i].charAt(1) != 't')))){\r
+                    && (args[i].charAt(1) != 'n') && (args[i].charAt(1) != 'p') && (args[i].charAt(1) != 't') && (args[i].charAt(1) != 'm')))){\r
                     HelpInfo.outputUsageInfo();\r
                     return false;\r
                 }\r
@@ -39,6 +52,9 @@ public class ParseParameter {
      **/\r
     private static void standardizeParameter(String[] args) {\r
         \r
+        //\r
+        // the parameters's length are same.\r
+        //\r
         length  = pstr.length();\r
         \r
         StringBuffer InputData = new StringBuffer();\r
@@ -70,17 +86,27 @@ public class ParseParameter {
             } else if (argstr.charAt(1) == 'n') {\r
                 nstr += argstr.substring(2);\r
 //                nstr += "\n";\r
-            }\r
+            } else if (argstr.charAt(1) == 'm') {\r
+                mstr += argstr.substring(2);\r
+//              mstr += "\n";\r
+                if (argstr.charAt(3) == '0'){\r
+                    mestr += " Disable";\r
+                } else {\r
+                    mestr += " Enable";\r
+                }\r
+          }\r
             i = j;\r
         }\r
 \r
     }\r
      \r
     public static int length  = 0;\r
-    public static String pstr = new String("ACTIVE_PLATFORM       = ");\r
-    public static String tstr = new String("TARGET                = ");\r
-    public static String astr = new String("TARGET_ARCH           = ");\r
-    public static String cstr = new String("TOOL_CHAIN_CONF       = ");\r
-    public static String nstr = new String("TOOL_CHAIN_TAG        = ");\r
+    public static String pstr = new String("ACTIVE_PLATFORM                     = ");\r
+    public static String tstr = new String("TARGET                              = ");\r
+    public static String astr = new String("TARGET_ARCH                         = ");\r
+    public static String cstr = new String("TOOL_CHAIN_CONF                     = ");\r
+    public static String nstr = new String("TOOL_CHAIN_TAG                      = ");\r
+    public static String mstr = new String("MAX_CONCURRENT_THREAD_NUMBER        = ");\r
+    public static String mestr = new String("MULTIPLE_THREAD                     = ");\r
 \r
 }\r