Changeset 17091 in vbox for trunk/src/VBox/HostDrivers/Support/win
- Timestamp:
- Feb 24, 2009 7:55:23 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43321
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp
r14303 r17091 263 263 */ 264 264 bool fVerbose = false; 265 static const RT OPTIONDEF s_aOptions[] =265 static const RTGETOPTDEF s_aOptions[] = 266 266 { 267 267 { "--verbose", 'v', RTGETOPT_REQ_NOTHING } 268 268 }; 269 int iArg = 0;270 269 int ch; 271 RTOPTIONUNION Value; 272 while ((ch = RTGetOpt(argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), &iArg, &Value))) 270 RTGETOPTUNION Value; 271 RTGETOPTSTATE GetState; 272 RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /* fFlags*/); 273 while ((ch = RTGetOpt(&GetState, &Value))) 273 274 switch (ch) 274 275 { 275 case 'v': fVerbose = true; break; 276 default: return supSvcDisplayGetOptError("delete", ch, argc, argv, iArg, &Value); 277 } 278 if (iArg != argc) 279 return supSvcDisplayTooManyArgsError("delete", argc, argv, iArg); 276 case 'v': 277 fVerbose = true; 278 break; 279 case VINF_GETOPT_NOT_OPTION: 280 return supSvcDisplayTooManyArgsError("delete", argc, argv, iArg); 281 default: 282 return supSvcDisplayGetOptError("delete", ch, argc, argv, iArg, &Value); 283 } 280 284 281 285 /* … … 328 332 int iArg = 0; 329 333 int ch; 330 RT OPTIONUNION Value;334 RTGETOPTUNION Value; 331 335 while ((ch = RTGetOpt(argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), &iArg, &Value))) 332 336 switch (ch) … … 548 552 int ch; 549 553 int rc = 0; 550 RT OPTIONUNION Value;554 RTGETOPTUNION Value; 551 555 while ( !rc 552 556 && (ch = RTGetOpt(cArgs, papszArgs, s_aOptions, RT_ELEMENTS(s_aOptions), &iArg, &Value))) … … 646 650 int iArg = 0; 647 651 int ch; 648 RT OPTIONUNION Value;652 RTGETOPTUNION Value; 649 653 while ((ch = RTGetOpt(argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), &iArg, &Value))) 650 654 switch (ch) … … 701 705 int iArg = 0; 702 706 int ch; 703 RT OPTIONUNION Value;707 RTGETOPTUNION Value; 704 708 while ((ch = RTGetOpt(argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), &iArg, &Value))) 705 709 switch (ch)
Note:
See TracChangeset
for help on using the changeset viewer.