Changeset 31301 in vbox
- Timestamp:
- Aug 2, 2010 1:33:24 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64328
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r31296 r31301 3477 3477 ComObjPtr<MediumAttachment> attachment; 3478 3478 attachment.createObject(); 3479 rc = attachment->init(this, medium, aControllerName, aControllerPort, aDevice, aType, indirect );3479 rc = attachment->init(this, medium, aControllerName, aControllerPort, aDevice, aType, indirect, 0 /* No bandwidth limit */); 3480 3480 if (FAILED(rc)) return rc; 3481 3481 … … 7165 7165 dev.lDevice, 7166 7166 dev.deviceType, 7167 dev.fPassThrough); 7167 dev.fPassThrough, 7168 dev.ulBandwidthLimit); 7168 7169 if (FAILED(rc)) break; 7169 7170 … … 8364 8365 pAtt->getDevice(), 8365 8366 DeviceType_HardDisk, 8366 true /* aImplicit */); 8367 true /* aImplicit */, 8368 0 /* No bandwidth limit */); 8367 8369 if (FAILED(rc)) throw rc; 8368 8370 -
trunk/src/VBox/Main/MediumAttachmentImpl.cpp
r31287 r31301 39 39 type(DeviceType_Null), 40 40 fPassthrough(false), 41 fImplicit(false) 41 fImplicit(false), 42 mBandwidthLimit(0) 42 43 { } 43 44 … … 92 93 * Initializes the medium attachment object. 93 94 * 94 * @param aParent Machine object. 95 * @param aMedium Medium object. 96 * @param aController Controller the hard disk is attached to. 97 * @param aPort Port number. 98 * @param aDevice Device number on the port. 99 * @param aPassthrough Wether accesses are directly passed to the host drive. 95 * @param aParent Machine object. 96 * @param aMedium Medium object. 97 * @param aController Controller the hard disk is attached to. 98 * @param aPort Port number. 99 * @param aDevice Device number on the port. 100 * @param aPassthrough Whether accesses are directly passed to the host drive. 101 * @param aBandwidthLimit Bandwidth limit in Mbps 100 102 */ 101 103 HRESULT MediumAttachment::init(Machine *aParent, … … 105 107 LONG aDevice, 106 108 DeviceType_T aType, 107 bool aPassthrough) 109 bool aPassthrough, 110 ULONG aBandwidthLimit) 108 111 { 109 112 LogFlowThisFuncEnter(); … … 133 136 m->bd->fImplicit = false; 134 137 135 /* Default is no limit. */ 136 m->bd->mBandwidthLimit = 0; 138 m->bd->mBandwidthLimit = aBandwidthLimit; 137 139 138 140 /* Confirm a successful initialization when it's the case */ -
trunk/src/VBox/Main/include/MediumAttachmentImpl.h
r31287 r31301 48 48 LONG aDevice, 49 49 DeviceType_T aType, 50 bool fPassthrough); 50 bool fPassthrough, 51 ULONG aBandwidthLimit); 51 52 void uninit(); 52 53 -
trunk/src/VBox/Main/xml/Settings.cpp
r31293 r31301 1578 1578 && (uuid == a.uuid) 1579 1579 && (strHostDriveSrc == a.strHostDriveSrc) 1580 && (ulBandwidthLimit == a.ulBandwidthLimit) 1580 1581 ) 1581 1582 ); … … 2754 2755 throw ConfigFileError(this, pelmImage, N_("Required AttachedDevice/@device attribute is missing")); 2755 2756 2757 pelmAttached->getAttributeValue("bandwidthLimit", att.ulBandwidthLimit); 2756 2758 sctl.llAttachedDevices.push_back(att); 2757 2759 } … … 3814 3816 pelmDevice->setAttribute("device", att.lDevice); 3815 3817 3818 if (att.ulBandwidthLimit) 3819 pelmDevice->setAttribute("bandwidthLimit", att.ulBandwidthLimit); 3820 3816 3821 // attached image, if any 3817 3822 if ( !att.uuid.isEmpty() … … 4153 4158 break; /* abort the loop -- we will not raise the version further */ 4154 4159 } 4160 4161 /* Bandwidth limitations are new in VirtualBox 3.3 (1.11) */ 4162 if (att.ulBandwidthLimit != 0) 4163 { 4164 m->sv = SettingsVersion_v1_11; 4165 break; /* abort the loop -- we will not raise the version further */ 4166 } 4155 4167 } 4156 4168 }
Note:
See TracChangeset
for help on using the changeset viewer.