X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FContextTool%2Forg%2Ftianocore%2Fcontext%2FParseParameter.java;h=4d9c6de3a07c1f014f451f325e288a7b2e150793;hp=24adfb70f1f21f88a5f448a4d235a8a04374d29b;hb=2f96bdd1b9358bb1b14e6c6c7399756dbbb9f222;hpb=e64872fa8b577189395edb6624b9e178989fd3e5 diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java index 24adfb70f1..4d9c6de3a0 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java @@ -78,7 +78,11 @@ public class ParseParameter { // argstr is "-p ", display current setting // if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curpstr); + if (curpstr != null) { + System.out.printf("%s\n", curpstr); + } else { + System.out.printf("No ACTIVE_PLATFORM defined \n"); + } return 1; } // @@ -106,7 +110,11 @@ public class ParseParameter { npflag = true; } else if (argstr.charAt(1) == 't') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curtstr); + if (curtstr != null) { + System.out.printf("%s\n", curtstr); + } else { + System.out.printf("No TARGET defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -122,7 +130,11 @@ public class ParseParameter { ntflag = true; } else if (argstr.charAt(1) == 'a') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curastr); + if (curastr != null) { + System.out.printf("%s\n", curastr); + } else { + System.out.printf("No TARGET_ARCH defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -138,7 +150,11 @@ public class ParseParameter { naflag = true; } else if (argstr.charAt(1) == 'c') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curcstr); + if (curcstr != null) { + System.out.printf("%s\n", curcstr); + } else { + System.out.printf("No TOOL_CHAIN_CONF defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -160,7 +176,11 @@ public class ParseParameter { ncflag = true; } else if (argstr.charAt(1) == 'n') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curnstr); + if (curnstr != null) { + System.out.printf("%s\n", curnstr); + } else { + System.out.printf("No TOOL_CHAIN_TAG defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -176,7 +196,11 @@ public class ParseParameter { nnflag = true; } else if (argstr.charAt(1) == 'm') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curmstr); + if (curmstr != null) { + System.out.printf("%s\n", curmstr); + } else { + System.out.printf("No MAX_CONCURRENT_THREAD_NUMBER defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){