Changeset 17685 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 11, 2009 12:22:40 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r17670 r17685 1886 1886 1887 1887 STDMETHODIMP Machine::AttachHardDisk(IN_GUID aId, 1888 IN_BSTR aControllerName, LONG a Port,1888 IN_BSTR aControllerName, LONG aControllerPort, 1889 1889 LONG aDevice) 1890 1890 { … … 1927 1927 CheckComRCReturnRC(rc); 1928 1928 1929 if ( (a Port < 0) || (aPort >= portCount)1929 if ( (aControllerPort < 0) || (aControllerPort >= portCount) 1930 1930 || (aDevice < 0) || (aDevice >= devicesPerPort)) 1931 1931 return setError (E_INVALIDARG, … … 1937 1937 std::find_if (mHDData->mAttachments.begin(), 1938 1938 mHDData->mAttachments.end(), 1939 HardDiskAttachment::EqualsTo (aControllerName, a Port, aDevice));1939 HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice)); 1940 1940 1941 1941 if (it != mHDData->mAttachments.end()) … … 1946 1946 tr ("Hard disk '%ls' is already attached to device slot %d on " 1947 1947 "port %d of controller '%ls' of this virtual machine"), 1948 hd->locationFull().raw(), aDevice, a Port, aControllerName);1948 hd->locationFull().raw(), aDevice, aControllerPort, aControllerName); 1949 1949 } 1950 1950 … … 1993 1993 /* see if it's the same bus/channel/device */ 1994 1994 if ((*it)->device() == aDevice && 1995 (*it)->port() == a Port &&1995 (*it)->port() == aControllerPort && 1996 1996 (*it)->controller() == aControllerName) 1997 1997 { … … 2051 2051 */ 2052 2052 if ((*it)->device() == aDevice && 2053 (*it)->port() == a Port &&2053 (*it)->port() == aControllerPort && 2054 2054 (*it)->controller() == aControllerName) 2055 2055 { … … 2111 2111 */ 2112 2112 if ((*it)->device() == aDevice && 2113 (*it)->port() == a Port &&2113 (*it)->port() == aControllerPort && 2114 2114 (*it)->controller() == aControllerName) 2115 2115 { … … 2187 2187 ComObjPtr<HardDiskAttachment> attachment; 2188 2188 attachment.createObject(); 2189 rc = attachment->init (hd, aControllerName, a Port, aDevice, indirect);2189 rc = attachment->init (hd, aControllerName, aControllerPort, aDevice, indirect); 2190 2190 CheckComRCReturnRC (rc); 2191 2191 … … 2206 2206 } 2207 2207 2208 STDMETHODIMP Machine::GetHardDisk(IN_BSTR aControllerName, LONG a Port,2208 STDMETHODIMP Machine::GetHardDisk(IN_BSTR aControllerName, LONG aControllerPort, 2209 2209 LONG aDevice, IHardDisk **aHardDisk) 2210 2210 { … … 2225 2225 std::find_if (mHDData->mAttachments.begin(), 2226 2226 mHDData->mAttachments.end(), 2227 HardDiskAttachment::EqualsTo (aControllerName, a Port, aDevice));2227 HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice)); 2228 2228 2229 2229 if (it == mHDData->mAttachments.end()) 2230 2230 return setError (VBOX_E_OBJECT_NOT_FOUND, 2231 2231 tr ("No hard disk attached to device slot %d on port %d of controller '%ls'"), 2232 aDevice, a Port, aControllerName);2232 aDevice, aControllerPort, aControllerName); 2233 2233 2234 2234 (*it)->hardDisk().queryInterfaceTo (aHardDisk); … … 2237 2237 } 2238 2238 2239 STDMETHODIMP Machine::DetachHardDisk(IN_BSTR aControllerName, LONG a Port,2239 STDMETHODIMP Machine::DetachHardDisk(IN_BSTR aControllerName, LONG aControllerPort, 2240 2240 LONG aDevice) 2241 2241 { … … 2262 2262 std::find_if (mHDData->mAttachments.begin(), 2263 2263 mHDData->mAttachments.end(), 2264 HardDiskAttachment::EqualsTo (aControllerName, a Port, aDevice));2264 HardDiskAttachment::EqualsTo (aControllerName, aControllerPort, aDevice)); 2265 2265 2266 2266 if (it == mHDData->mAttachments.end()) 2267 2267 return setError (VBOX_E_OBJECT_NOT_FOUND, 2268 2268 tr ("No hard disk attached to device slot %d on port %d of controller '%ls'"), 2269 aDevice, a Port, aControllerName);2269 aDevice, aControllerPort, aControllerName); 2270 2270 2271 2271 ComObjPtr<HardDiskAttachment> hda = *it; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r17684 r17685 4323 4323 <desc>Name of the storage controller to attach the hard disk to.</desc> 4324 4324 </param> 4325 <param name=" port" type="long" dir="in">4325 <param name="controllerPort" type="long" dir="in"> 4326 4326 <desc>Port to attach the hard disk to.</desc> 4327 4327 </param> … … 4352 4352 <desc>Name of the storage controller the hard disk is attached to.</desc> 4353 4353 </param> 4354 <param name=" port" type="long" dir="in">4354 <param name="controllerPort" type="long" dir="in"> 4355 4355 <desc>Port to query.</desc> 4356 4356 </param> … … 4401 4401 <desc>name of the storage controller to detach the hard disk from.</desc> 4402 4402 </param> 4403 <param name=" port" type="long" dir="in">4403 <param name="controllerPort" type="long" dir="in"> 4404 4404 <desc>Port number to detach the hard disk from.</desc> 4405 4405 </param> -
trunk/src/VBox/Main/include/MachineImpl.h
r17684 r17685 540 540 STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice); 541 541 STDMETHOD(AttachHardDisk)(IN_GUID aId, IN_BSTR aControllerName, 542 LONG a Port, LONG aDevice);543 STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG a Port, LONG aDevice,542 LONG aControllerPort, LONG aDevice); 543 STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, 544 544 IHardDisk **aHardDisk); 545 STDMETHOD(DetachHardDisk)(IN_BSTR aControllerName, LONG a Port, LONG aDevice);545 STDMETHOD(DetachHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice); 546 546 STDMETHOD(GetSerialPort) (ULONG slot, ISerialPort **port); 547 547 STDMETHOD(GetParallelPort) (ULONG slot, IParallelPort **port);
Note:
See TracChangeset
for help on using the changeset viewer.