VirtualBox

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


Ignore:
Timestamp:
Mar 4, 2008 2:12:17 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28615
Message:

Make the backend type a per-image property and get away from the per container property. Required e.g. for snapshotting iSCSI disks (whenever we get there).

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

Legend:

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

    r7207 r7277  
    760760            rc = CFGMR3InsertString(pCfg,   "Path",             psz);                   RC_CHECK();
    761761            STR_FREE();
     762            rc = CFGMR3InsertString(pCfg,   "Format",           "VMDK");                RC_CHECK();
    762763        }
    763764        else if (hddType == HardDiskStorageType_CustomHardDisk)
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r7207 r7277  
    33813381
    33823382    /* initialize the container */
    3383     int vrc = VDCreate ("VMDK", VDError, this, &mContainer);
     3383    int vrc = VDCreate (VDError, this, &mContainer);
    33843384    ComAssertRCRet (vrc, E_FAIL);
    33853385
     
    40494049        /// obviously. This of course changes locking behavior, but for now
    40504050        /// this is acceptable. A better solution needs to be found later.
    4051         vrc = VDOpen (mContainer, filePath, VD_OPEN_FLAGS_NORMAL);
     4051        vrc = VDOpen (mContainer, "VMDK", filePath, VD_OPEN_FLAGS_NORMAL);
    40524052        if (VBOX_FAILURE (vrc))
    40534053            break;
     
    43164316
    43174317        /* initialize the container */
    4318         vrc = VDCreate (Utf8Str (mFormat), VDError, this, &mContainer);
     4318        vrc = VDCreate (VDError, this, &mContainer);
    43194319        if (VBOX_FAILURE (vrc))
    43204320        {
     
    44174417                break;
    44184418            }
     4419            mFormat = Bstr (pszFormat);
     4420            RTStrFree (pszFormat);
    44194421
    44204422            /* Create the corresponding container. */
    4421             vrc = VDCreate (pszFormat, VDError, this, &mContainer);
    4422 
    4423             if (VBOX_SUCCESS(vrc))
    4424                 mFormat = Bstr (pszFormat);
    4425 
    4426             RTStrFree (pszFormat);
     4423            vrc = VDCreate (VDError, this, &mContainer);
    44274424
    44284425            /* the format has been already checked for presence at this point */
     
    48854882        Guid id, parentId;
    48864883
    4887         vrc = VDOpen (mContainer, location, VD_OPEN_FLAGS_INFO);
     4884        vrc = VDOpen (mContainer, Utf8Str (mFormat), location, VD_OPEN_FLAGS_INFO);
    48884885        if (VBOX_FAILURE (vrc))
    48894886            break;
     
    50835080
    50845081    /* initialize the container */
    5085     int vrc = VDCreate ("VHD", VDError, this, &mContainer);
     5082    int vrc = VDCreate (VDError, this, &mContainer);
    50865083    ComAssertRCRet (vrc, E_FAIL);
    50875084
     
    57495746        /// obviously. This of course changes locking behavior, but for now
    57505747        /// this is acceptable. A better solution needs to be found later.
    5751         vrc = VDOpen (mContainer, filePath, VD_OPEN_FLAGS_NORMAL);
     5748        vrc = VDOpen (mContainer, "VHD", filePath, VD_OPEN_FLAGS_NORMAL);
    57525749        if (VBOX_FAILURE (vrc))
    57535750            break;
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