VirtualBox

Changeset 75918 in vbox


Ignore:
Timestamp:
Dec 3, 2018 5:09:43 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127124
Message:

Main/DHCPServer: (bugref:9288) Renamed '--slot' to '--nic' and made it 1-based instead of 0-based.

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp

    r75819 r75918  
    116116    { "--options",          'o', RTGETOPT_REQ_NOTHING },
    117117    { "--vm",               'n', RTGETOPT_REQ_STRING}, /* only with -o */
    118     { "--slot",             's', RTGETOPT_REQ_UINT8}, /* only with -o and -n */
     118    { "--nic",              'c', RTGETOPT_REQ_UINT8}, /* only with -o and -n */
    119119    { "--id",               'i', RTGETOPT_REQ_UINT8}, /* only with -o */
    120120    { "--value",            'p', RTGETOPT_REQ_STRING}, /* only with -i */
     
    240240                {
    241241        // {"--vm",                'n', RTGETOPT_REQ_STRING}, /* only with -o */
    242         // {"--slot",              's', RTGETOPT_REQ_UINT8}, /* only with -o and -n*/
     242        // {"--nic",               'c', RTGETOPT_REQ_UINT8}, /* only with -o and -n*/
    243243        // {"--id",                'i', RTGETOPT_REQ_UINT8}, /* only with -o */
    244244        // {"--value",             'p', RTGETOPT_REQ_STRING} /* only with -i */
     
    266266                break; /* end of --vm-name */
    267267
    268             case 's': // --slot
     268            case 'c': // --nic
    269269                {
    270270                    if (!fVmOptionRead)
     
    273273
    274274                    u8Slot = ValueUnion.u8;
    275                 }
    276                 break; /* end of --slot */
     275
     276                    if (u8Slot < 1)
     277                        return errorSyntax(USAGE_DHCPSERVER,
     278                                           "invalid NIC number: %u", u8Slot);
     279                    --u8Slot;
     280                }
     281                break; /* end of --nic */
    277282
    278283            case 'i': // --id
     
    298303                        && u8Slot == (uint8_t)~0)
    299304                        return errorSyntax(USAGE_DHCPSERVER,
    300                                            "--slot wasn't found");
     305                                           "--nic wasn't found");
    301306
    302307                    DhcpOpts &opts = fVmOptionRead ? VmSlot2Options[VmNameSlotKey(pszVmName, u8Slot)]
     
    320325                        && u8Slot == (uint8_t)~0)
    321326                        return errorSyntax(USAGE_DHCPSERVER,
    322                                            "--slot wasn't found");
     327                                           "--nic wasn't found");
    323328
    324329                    DhcpOptIds &optIds = fVmOptionRead ? VmSlot2Options2Delete[VmNameSlotKey(pszVmName, u8Slot)]
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r75819 r75918  
    12111211                     "                            --upperip <upper_ip>]\n"
    12121212                     "                            [--enable | --disable]\n"
    1213                      "                            [--options [--vm <name> --slot <number>]\n"
     1213                     "                            [--options [--vm <name> --nic <1-N>]\n"
    12141214                     "                             --id <number> [--value <string> | --remove]]\n"
    12151215                     "                             (multiple options allowed after --options)\n\n"
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r75850 r75918  
    796796    CHECK_ERROR2I_RET(pSrv, GetVmSlotOptions(vmName.raw(), uSlot, ComSafeArrayAsOutParam(options)), hrcCheck);
    797797    if (options.size())
    798         RTPrintf("Options for slot #%d of '%ls':\n", uSlot, vmName.raw());
     798        RTPrintf("Options for NIC %d of '%ls':\n", uSlot + 1, vmName.raw());
    799799    for (size_t i = 0; i < options.size(); ++i)
    800800        RTPrintf("   %ls\n", options[i]);
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