Changeset 26517 in vbox for trunk/src/VBox/VMM/testcase
- Timestamp:
- Feb 14, 2010 9:39:00 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM/testcase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp
r23513 r26517 26 26 #include <iprt/asm.h> 27 27 #include <iprt/assert.h> 28 #include <iprt/buildconfig.h> 28 29 #include <iprt/crc.h> 29 30 #include <iprt/ctype.h> … … 248 249 { "--page-file", 'f', RTGETOPT_REQ_STRING }, 249 250 { "--offset", 'o', RTGETOPT_REQ_UINT64 }, 250 { "--help", 'h', RTGETOPT_REQ_NOTHING },251 251 }; 252 252 … … 315 315 return 0; 316 316 317 case 'V': 318 RTPrintf("%sr%s\n", RTBldCfgVersion(), RTBldCfgRevisionStr()); 319 return 0; 320 317 321 default: 318 if (rc == VINF_GETOPT_NOT_OPTION) 319 Error("unknown argument: %s\n", Val.psz); 320 else if (rc > 0) 321 { 322 if (RT_C_IS_GRAPH(rc)) 323 Error("unhandled option: -%c\n", rc); 324 else 325 Error("unhandled option: %d\n", rc); 326 } 327 else if (rc == VERR_GETOPT_UNKNOWN_OPTION) 328 Error("unknown option: %s\n", Val.psz); 329 else if (Val.pDef) 330 Error("%s: %Rrs\n", Val.pDef->pszLong, rc); 331 else 332 Error("%Rrs\n", rc); 333 return 1; 322 return RTGetOptPrintError(rc, &Val); 334 323 } 335 324 } -
trunk/src/VBox/VMM/testcase/tstVMM.cpp
r26153 r26517 205 205 { "--cpus", 'c', RTGETOPT_REQ_UINT8 }, 206 206 { "--test", 't', RTGETOPT_REQ_STRING }, 207 { "--help", 'h', 0 },208 207 }; 209 208 enum … … 241 240 return 1; 242 241 243 case VINF_GETOPT_NOT_OPTION:244 RTPrintf(" tstVMM: syntax error: non option '%s'\n", ValueUnion.psz);245 break;242 case 'V': 243 RTPrintf("$Revision: $\n"); 244 return 0; 246 245 247 246 default: 248 if (ch > 0) 249 { 250 if (RT_C_IS_GRAPH(ch)) 251 RTPrintf("tstVMM: unhandled option: -%c\n", ch); 252 else 253 RTPrintf("tstVMM: unhandled option: %i\n", ch); 254 } 255 else if (ch == VERR_GETOPT_UNKNOWN_OPTION) 256 RTPrintf("tstVMM: unknown option: %s\n", ValueUnion.psz); 257 else if (ValueUnion.pDef) 258 RTPrintf("tstVMM: %s: %Rrs\n", ValueUnion.pDef->pszLong, ch); 259 else 260 RTPrintf("tstVMM: %Rrs\n", ch); 261 return 1; 247 return RTGetOptPrintError(ch, &ValueUnion); 262 248 } 263 249 }
Note:
See TracChangeset
for help on using the changeset viewer.