VirtualBox

Changeset 49190 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 18, 2013 3:26:52 PM (11 years ago)
Author:
vboxsync
Message:

Main,VBoxManage: Implement hotpluggable setting stubs

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r49069 r49190  
    19471947                                    lPortUsed[u32HDSataPortCount++] = lPortNum;
    19481948                                    LogFlowFunc(("HD Sata port Count=%d\n", u32HDSataPortCount));
     1949                                }
     1950
     1951                                /* Configure the hotpluggable flag for the port. */
     1952                                BOOL fHotPluggable = FALSE;
     1953                                hrc = pMediumAtt->COMGETTER(HotPluggable)(&fHotPluggable); H();
     1954                                if (SUCCEEDED(hrc))
     1955                                {
     1956                                    PCFGMNODE pPortCfg;
     1957                                    char szName[24];
     1958                                    RTStrPrintf(szName, sizeof(szName), "Port%d", lPortNum);
     1959
     1960                                    InsertConfigNode(pCfg, szName, &pPortCfg);
     1961                                    InsertConfigInteger(pPortCfg, "Hotpluggable", fHotPluggable ? 1 : 0);
    19491962                                }
    19501963                             }
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r49058 r49190  
    45124512                          false /* fNonRotational */,
    45134513                          false /* fDiscard */,
    4514                           false /* fHotPluggable */,
     4514                          fHotplug /* fHotPluggable */,
    45154515                          Utf8Str::Empty);
    45164516    if (FAILED(rc)) return rc;
     
    46414641                        aDevice, aControllerPort, aControllerName);
    46424642
     4643    if (fHotplug && !pAttach->getHotPluggable())
     4644        return setError(VBOX_E_NOT_SUPPORTED,
     4645                        tr("The device slot %d on port %d of controller '%ls' does not support hotplugging"),
     4646                        aDevice, aControllerPort, aControllerName);
     4647
    46434648    /*
    46444649     * The VM has to detach the device before we delete any implicit diffs.
     
    48764881                        aDevice, aControllerPort, aControllerName);
    48774882
    4878     /** @todo remove this blocker and add the missing code to support this
    4879      * flag properly in all code areas, with proper support checks below. */
     4883    /* Check for an existing controller. */
     4884    ComObjPtr<StorageController> ctl;
     4885    rc = getStorageControllerByName(aControllerName, ctl, true /* aSetError */);
     4886    if (FAILED(rc)) return rc;
     4887
     4888    StorageControllerType_T ctrlType;
     4889    rc = ctl->COMGETTER(ControllerType)(&ctrlType);
     4890    if (FAILED(rc))
     4891        return setError(E_FAIL,
     4892                        tr("Could not get type of controller '%ls'"),
     4893                        aControllerName);
     4894
     4895    if (!isControllerHotplugCapable(ctrlType))
    48804896    return setError(VBOX_E_NOT_SUPPORTED,
    48814897                    tr("Controller '%ls' does not support changing the hot-pluggable device flag"),
     
    97819797                               dev.fNonRotational,
    97829798                               dev.fDiscard,
    9783         /// @todo load setting once the hot-pluggable flag works
    9784                                false /*dev.fHotPluggable*/,
     9799                               dev.fHotPluggable,
    97859800                               pBwGroup.isNull() ? Utf8Str::Empty : pBwGroup->getName());
    97869801        if (FAILED(rc)) break;
     
    1088710902        dev.lDevice = pAttach->getDevice();
    1088810903        dev.fPassThrough = pAttach->getPassthrough();
    10889         /// @todo save setting once the hot-pluggable flag works
    10890         dev.fHotPluggable = false /* pAttach->getHotPluggable()*/;
     10904        dev.fHotPluggable = pAttach->getHotPluggable();
    1089110905        if (pMedium)
    1089210906        {
  • trunk/src/VBox/Main/xml/Settings.cpp

    r49066 r49190  
    34423442            att.fDiscard = false;
    34433443            att.fNonRotational = false;
     3444            att.fHotPluggable = false;
    34443445
    34453446            if (strTemp == "HardDisk")
Note: See TracChangeset for help on using the changeset viewer.

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