Changeset 29353 in vbox
- Timestamp:
- May 11, 2010 1:42:11 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r29218 r29353 876 876 { 877 877 BuildMachineXML_IncludeSnapshots = 0x01, 878 BuildMachineXML_WriteVboxVersionAttribute = 0x02 878 BuildMachineXML_WriteVboxVersionAttribute = 0x02, 879 BuildMachineXML_SkipRemovableMedia = 0x02 879 880 }; 880 881 void buildMachineXML(xml::ElementNode &elmMachine, uint32_t fl); … … 899 900 void buildHardwareXML(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg); 900 901 void buildNetworkXML(NetworkAttachmentType_T mode, xml::ElementNode &elmParent, const NetworkAdapter &nic); 901 void buildStorageControllersXML(xml::ElementNode &elmParent, const Storage &st );902 void buildStorageControllersXML(xml::ElementNode &elmParent, const Storage &st, bool fSkipRemovableMedia); 902 903 void buildSnapshotXML(xml::ElementNode &elmParent, const Snapshot &snap); 903 904 -
trunk/src/VBox/Main/ApplianceImplExport.cpp
r29331 r29353 1297 1297 // write the machine config to the vbox:Machine element 1298 1298 pConfig->buildMachineXML(*pelmVBoxMachine, 1299 settings::MachineConfigFile::BuildMachineXML_WriteVboxVersionAttribute); 1299 settings::MachineConfigFile::BuildMachineXML_WriteVboxVersionAttribute 1300 | settings::MachineConfigFile::BuildMachineXML_SkipRemovableMedia); 1300 1301 // but not BuildMachineXML_IncludeSnapshots 1301 1302 delete pConfig; -
trunk/src/VBox/Main/xml/Settings.cpp
r29310 r29353 3651 3651 * @param elmParent 3652 3652 * @param st 3653 * @param fSkipRemovableMedia If true, DVD and floppy attachments are skipped and 3654 * an empty drive is always written instead. This is for the OVF export case. 3655 * This parameter is ignored unless the settings version is at least v1.9, which 3656 * is always the case when this gets called for OVF export. 3653 3657 */ 3654 3658 void MachineConfigFile::buildStorageControllersXML(xml::ElementNode &elmParent, 3655 const Storage &st) 3659 const Storage &st, 3660 bool fSkipRemovableMedia) 3656 3661 { 3657 3662 xml::ElementNode *pelmStorageControllers = elmParent.createChild("StorageControllers"); … … 3765 3770 pelmDevice->setAttribute("device", att.lDevice); 3766 3771 3767 if (!att.uuid.isEmpty()) 3772 if ( !att.uuid.isEmpty() 3773 && ( att.deviceType == DeviceType_HardDisk 3774 || !fSkipRemovableMedia 3775 ) 3776 ) 3768 3777 pelmDevice->createChild("Image")->setAttribute("uuid", makeString(att.uuid)); 3769 3778 else if ( (m->sv >= SettingsVersion_v1_9) … … 3798 3807 3799 3808 buildHardwareXML(*pelmSnapshot, snap.hardware, snap.storage); 3800 buildStorageControllersXML(*pelmSnapshot, snap.storage); 3809 buildStorageControllersXML(*pelmSnapshot, 3810 snap.storage, 3811 false /* fSkipRemovableMedia */); 3812 // we only skip removable media for OVF, but we never get here for OVF 3813 // since snapshots never get written then 3801 3814 3802 3815 if (snap.llChildSnapshots.size()) … … 3835 3848 * the OVF export case in which we don't have the settings version set in 3836 3849 * the root element. 3850 * 3851 * -- BuildMachineXML_SkipRemovableMedia: If set, removable media attachments 3852 * (DVDs, floppies) are silently skipped. This is for the OVF export case 3853 * until we support copying ISO and RAW media as well. This flas is ignored 3854 * unless the settings version is at least v1.9, which is always the case 3855 * when this gets called for OVF export. 3837 3856 * 3838 3857 * @param elmMachine XML <Machine> element to add attributes and elements to. … … 3887 3906 3888 3907 buildHardwareXML(elmMachine, hardwareMachine, storageMachine); 3889 buildStorageControllersXML(elmMachine, storageMachine); 3908 buildStorageControllersXML(elmMachine, 3909 storageMachine, 3910 !!(fl & BuildMachineXML_SkipRemovableMedia)); 3890 3911 } 3891 3912
Note:
See TracChangeset
for help on using the changeset viewer.