Changeset 63301 in vbox for trunk/src/VBox/NetworkServices/NetLib
- Timestamp:
- Aug 10, 2016 8:45:33 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109934
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
r63267 r63301 247 247 * @param argc Argument count. 248 248 * @param argv Argument vector. 249 * 250 * @todo r=bird: The --help and --version options shall not return a 251 * non-zero exit code. So, this method need to grow some 252 * complexity. I'm to blame for that blunder :/ 249 253 */ 250 254 int VBoxNetBaseService::parseArgs(int argc, char **argv) … … 295 299 { 296 300 RTStrmPrintf(g_pStdErr, "Invalid trunk type '%s'\n", Val.psz); 297 return 1;301 return RTEXITCODE_SYNTAX; 298 302 } 299 303 break; … … 317 321 case 'V': // --version (missed) 318 322 RTPrintf("%sr%u\n", RTBldCfgVersion(), RTBldCfgRevision()); 319 return 1; 323 return 1; /** @todo this exit code is wrong, of course. :/ */ 320 324 321 325 case 'M': // --need-main … … 338 342 RTPrintf(" -%c, %s\n", m->m_vecOptionDefs[i]->iShort, m->m_vecOptionDefs[i]->pszLong); 339 343 usage(); /* to print Service Specific usage */ 340 return 1; 344 return 1; /** @todo this exit code is wrong, of course. :/ */ 341 345 342 346 default: … … 345 349 if (RT_FAILURE(rc1)) 346 350 { 347 rc= RTGetOptPrintError(rc, &Val);351 RTEXITCODE rcExit = RTGetOptPrintError(rc, &Val); 348 352 RTPrintf("Use --help for more information.\n"); 349 return rc ;353 return rcExit; 350 354 } 351 355 break; … … 355 359 356 360 RTMemFree(paOptionArray); 357 return rc;361 return RTEXITCODE_SUCCESS; 358 362 } 359 363
Note:
See TracChangeset
for help on using the changeset viewer.