Changeset 18626 in vbox for trunk/src/VBox
- Timestamp:
- Apr 2, 2009 10:58:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r18274 r18626 39 39 # include <VBox/vrdpapi.h> 40 40 #endif 41 #include <iprt/ctype.h> 41 42 #include <iprt/initterm.h> 42 43 #include <iprt/stream.h> … … 70 71 do { \ 71 72 Log (("VBoxHeadless: ERROR: " m " [rc=0x%08X]\n", rc)); \ 72 RTPrintf ("%s ", m); \73 RTPrintf ("%s\n", m); \ 73 74 } while (0) 74 75 … … 514 515 while ((ch = RTGetOpt(&GetState, &ValueUnion))) 515 516 { 516 if (ch < 0)517 {518 show_usage();519 exit(-1);520 }521 517 switch(ch) 522 518 { … … 580 576 #endif /* VBOX_FFMPEG defined */ 581 577 case VINF_GETOPT_NOT_OPTION: 582 /* ignore */ 583 break; 584 default: /* comment */ 585 /** @todo If we would not ignore this, that would be really really nice... */ 586 break; 578 RTPrintf("Invalid parameter '%s'\n\n", ValueUnion.psz); 579 show_usage(); 580 return -1; 581 default: 582 if (ch > 0) 583 { 584 if (RT_C_IS_PRINT(ch)) 585 RTPrintf("Invalid option -%c\n\n", ch); 586 else 587 RTPrintf("Invalid option case %i", ch); 588 } 589 else if (ch == VERR_GETOPT_UNKNOWN_OPTION) 590 RTPrintf("Unknown option: %s\n\n", ValueUnion.psz); 591 else if (ValueUnion.pDef) 592 RTPrintf("%s: %Rrs\n\n", ValueUnion.pDef->pszLong, ch); 593 else 594 RTPrintf("Error: %Rrs", ch); 595 show_usage(); 596 return -1; 587 597 } 588 598 }
Note:
See TracChangeset
for help on using the changeset viewer.