VirtualBox

Ignore:
Timestamp:
Feb 14, 2010 9:39:00 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57688
Message:

*: RTGetOpt cleanup related to --help and --version (now standard option). Use RTGetOptPrintError.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r25771 r26517  
    710710        { "--upper-ip",       'u',   RTGETOPT_REQ_IPV4ADDR },
    711711        { "--netmask",        'm',   RTGETOPT_REQ_IPV4ADDR },
    712 
    713         { "--help",           'h',   RTGETOPT_REQ_NOTHING },
    714         { "--version ",       'V',   RTGETOPT_REQ_NOTHING },
    715712    };
    716713
    717714    RTGETOPTSTATE State;
    718     int rc = RTGetOptInit(&State, argc, argv, &s_aOptionDefs[0], RT_ELEMENTS(s_aOptionDefs), 0, 0);
     715    int rc = RTGetOptInit(&State, argc, argv, &s_aOptionDefs[0], RT_ELEMENTS(s_aOptionDefs), 0, 0 /*fFlags*/);
    719716    AssertRCReturn(rc, 49);
    720717
     
    833830                return 1;
    834831
    835             case VERR_GETOPT_UNKNOWN_OPTION:
    836             case VINF_GETOPT_NOT_OPTION:
    837                 RTPrintf("Unknown option '%s'. Use --help for more information.\n", Val.psz);
    838                 return 1;
    839 
    840832            default:
    841                 break;
     833                rc = RTGetOptPrintError(rc, &Val);
     834                RTPrintf("Use --help for more information.\n");
     835                return rc;
    842836        }
    843837    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette