Changeset 23808 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 15, 2009 3:57:30 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53550
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r23803 r23808 2741 2741 const AttachedDevice &att = *it2; 2742 2742 2743 /* DVD/Floppy is handled already for settings version before 1.8 */ 2744 if ( att.deviceType == DeviceType_DVD 2745 && m->sv <= SettingsVersion_v1_8) 2746 continue; 2747 2743 2748 xml::ElementNode *pelmDevice = pelmController->createChild("AttachedDevice"); 2744 2749 … … 2751 2756 break; 2752 2757 2753 case DeviceType_DVD: // settings format 1.9 2754 if (m->sv >= SettingsVersion_v1_9) 2755 { 2756 pcszType = "DVD"; 2757 if (att.fPassThrough) 2758 pelmDevice->setAttribute("passthrough", att.fPassThrough); 2759 } 2758 case DeviceType_DVD: 2759 pcszType = "DVD"; 2760 if (att.fPassThrough) 2761 pelmDevice->setAttribute("passthrough", att.fPassThrough); 2760 2762 break; 2761 2763 2762 2764 case DeviceType_Floppy: 2763 if (m->sv >= SettingsVersion_v1_9) 2764 pcszType = "Floppy"; 2765 pcszType = "Floppy"; 2765 2766 break; 2766 2767 } 2767 2768 2768 if (pcszType) // can be NULL for pre-1.9 settings that shouldn't be written here 2769 { 2770 pelmDevice->setAttribute("type", pcszType); 2771 2772 pelmDevice->setAttribute("port", att.lPort); 2773 pelmDevice->setAttribute("device", att.lDevice); 2774 2775 if (!att.uuid.isEmpty()) 2776 pelmDevice->createChild("Image")->setAttribute("uuid", makeString(att.uuid)); 2777 else if ( (m->sv >= SettingsVersion_v1_9) 2778 && (att.strHostDriveSrc.length()) 2779 ) 2780 pelmDevice->createChild("HostDrive")->setAttribute("src", att.strHostDriveSrc); 2781 } 2769 pelmDevice->setAttribute("type", pcszType); 2770 2771 pelmDevice->setAttribute("port", att.lPort); 2772 pelmDevice->setAttribute("device", att.lDevice); 2773 2774 if (!att.uuid.isEmpty()) 2775 pelmDevice->createChild("Image")->setAttribute("uuid", makeString(att.uuid)); 2776 else if ( (m->sv >= SettingsVersion_v1_9) 2777 && (att.strHostDriveSrc.length()) 2778 ) 2779 pelmDevice->createChild("HostDrive")->setAttribute("src", att.strHostDriveSrc); 2782 2780 } 2783 2781 }
Note:
See TracChangeset
for help on using the changeset viewer.