VirtualBox

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


Ignore:
Timestamp:
Oct 15, 2013 6:20:39 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89937
Message:

pr6927. ISO images are skipped by default during export. The command "VBoxManage export" has a new argument "--iso" to explicitly export ISO images.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r49038 r49103  
    339339    const settings::MachineConfigFile* getMachineConfig() const;
    340340
     341    void removeByType(VirtualSystemDescriptionType_T aType);
     342
    341343    /* private instance data */
    342344private:
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r49038 r49103  
    5555      , fManifest(true)
    5656      , fSha256(false)
     57      , fExportISOImages(false)
    5758      , pReader(NULL)
    5859      , ulWeightForXmlOperation(0)
     
    7879    bool                fSha256;        // true = SHA256 (OVF 2.0), false = SHA1 (OVF 1.0)
    7980    Utf8Str             strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import)
     81
     82    bool                fExportISOImages;// when 1 the ISO images are exported
    8083
    8184    RTCList<ImportOptions_T> optListImport;
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r49039 r49103  
    15591559
    15601560/**
     1561 * Private method; delete all records from the list
     1562 * m->llDescriptions that match the given type.
     1563 * @param aType
     1564 * @return
     1565 */
     1566void VirtualSystemDescription::removeByType(VirtualSystemDescriptionType_T aType)
     1567{
     1568    std::list<VirtualSystemDescriptionEntry*> vsd;
     1569
     1570    list<VirtualSystemDescriptionEntry>::iterator it = m->llDescriptions.begin();
     1571    while (it != m->llDescriptions.end())
     1572    {
     1573        if (it->type == aType)
     1574            it = m->llDescriptions.erase(it);
     1575        else
     1576            ++it;
     1577    }
     1578}
     1579
     1580/**
    15611581 * Private method; looks thru the member hardware items for the IDE, SATA, or SCSI controller with
    15621582 * the given reference ID. Useful when needing the controller for a particular
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r49047 r49103  
    597597        m->optListExport = com::SafeArray<ExportOptions_T>(ComSafeArrayInArg(options)).toList();
    598598
    599     AssertReturn(!(m->optListExport.contains(ExportOptions_CreateManifest) && m->optListExport.contains(ExportOptions_ExportDVDImages)), E_INVALIDARG);
     599//    AssertReturn(!(m->optListExport.contains(ExportOptions_CreateManifest) && m->optListExport.contains(ExportOptions_ExportDVDImages)), E_INVALIDARG);
     600
     601    m->fExportISOImages = m->optListExport.contains(ExportOptions_ExportDVDImages);
     602
     603    if (!m->fExportISOImages)/* remove all ISO images from VirtualSystemDescription */
     604    {
     605        list< ComObjPtr<VirtualSystemDescription> >::const_iterator it;
     606        for (it = m->virtualSystemDescriptions.begin();
     607             it != m->virtualSystemDescriptions.end();
     608             ++it)
     609        {
     610            ComObjPtr<VirtualSystemDescription> vsdescThis = (*it);
     611            vsdescThis->removeByType(VirtualSystemDescriptionType_CDROM);
     612        }
     613    }
    600614
    601615    // do not allow entering this method if the appliance is busy reading or writing
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