- Timestamp:
- Dec 5, 2008 3:38:31 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r15039 r15050 1808 1808 1809 1809 if (aDevice == DeviceType_USB) 1810 return setError (E_ FAIL,1811 tr ("Booting from USB device s is not currentlysupported"));1810 return setError (E_NOTIMPL, 1811 tr ("Booting from USB device is currently not supported")); 1812 1812 1813 1813 AutoCaller autoCaller (this); … … 1865 1865 { 1866 1866 if (aChannel < 0 || aChannel > 1) 1867 return setError (E_ FAIL,1867 return setError (E_INVALIDARG, 1868 1868 tr ("Invalid IDE channel: %l (must be in range [0, 1])"), 1869 1869 aChannel); … … 1872 1872 { 1873 1873 if (aDevice < 0 || aDevice > 1) 1874 return setError (E_ FAIL,1874 return setError (E_INVALIDARG, 1875 1875 tr ("Invalid IDE device slot: %l (must be in range " 1876 1876 "[0, 1] for channel 0)"), … … 1882 1882 /* Device slot 0 is reserved for the CD/DVD drive. */ 1883 1883 if (aDevice != 1) 1884 return setError (E_ FAIL,1884 return setError (E_INVALIDARG, 1885 1885 tr ("Invalid IDE device slot: %l (must be " 1886 1886 "1 for channel 1)"), … … 1904 1904 /// @todo NEWMEDIA implicit machine registration 1905 1905 if (!mData->mRegistered) 1906 return setError ( E_FAIL,1906 return setError (VBOX_E_INVALID_OBJECT_STATE, 1907 1907 tr ("Cannot attach hard disks to an unregistered machine")); 1908 1908 … … 1910 1910 1911 1911 if (mData->mMachineState >= MachineState_Running) 1912 return setError ( E_FAIL,1912 return setError (VBOX_E_INVALID_VM_STATE, 1913 1913 tr ("Invalid machine state: %d"), mData->mMachineState); 1914 1914 … … 1923 1923 ComObjPtr <HardDisk2> hd = (*it)->hardDisk(); 1924 1924 AutoReadLock hdLock (hd); 1925 return setError ( E_FAIL,1925 return setError (VBOX_E_OBJECT_IN_USE, 1926 1926 tr ("Hard disk '%ls' is already attached to device slot %d on " 1927 1927 "channel %d of bus %d of this virtual machine"), … … 1946 1946 mHDData->mAttachments.end()) 1947 1947 { 1948 return setError ( E_FAIL,1948 return setError (VBOX_E_OBJECT_IN_USE, 1949 1949 tr ("Hard disk '%ls' is already attached to this virtual machine"), 1950 1950 hd->locationFull().raw()); … … 2189 2189 LONG aDevice, IHardDisk2 **aHardDisk) 2190 2190 { 2191 if (aBus == StorageBus_Null)2192 return E_INVALIDARG;2191 CheckComArgExpr(aBus, aBus != StorageBus_Null); 2192 CheckComArgOutPointerValid(aHardDisk); 2193 2193 2194 2194 AutoCaller autoCaller (this); … … 2205 2205 2206 2206 if (it == mHDData->mAttachments.end()) 2207 return setError ( E_INVALIDARG,2207 return setError (VBOX_E_OBJECT_NOT_FOUND, 2208 2208 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 2209 2209 aDevice, aChannel, aBus); … … 2217 2217 LONG aDevice) 2218 2218 { 2219 if (aBus == StorageBus_Null) 2220 return E_INVALIDARG; 2219 CheckComArgExpr(aBus, aBus != StorageBus_Null); 2221 2220 2222 2221 AutoCaller autoCaller (this); … … 2231 2230 2232 2231 if (mData->mMachineState >= MachineState_Running) 2233 return setError ( E_FAIL,2232 return setError (VBOX_E_INVALID_VM_STATE, 2234 2233 tr ("Invalid machine state: %d"), mData->mMachineState); 2235 2234 … … 2240 2239 2241 2240 if (it == mHDData->mAttachments.end()) 2242 return setError ( E_INVALIDARG,2241 return setError (VBOX_E_OBJECT_NOT_FOUND, 2243 2242 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 2244 2243 aDevice, aChannel, aBus); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r15044 r15050 3570 3570 3571 3571 @todo setHardDiskBootOrder(), setNetworkBootOrder() 3572 3573 <result name="E_INVALIDARG"> 3574 Boot @a position out of range. 3575 </result> 3576 <result name="E_NOTIMPL"> 3577 Booting from USB @a device currently not supported. 3578 </result> 3579 3572 3580 </desc> 3573 3581 <param name="position" type="unsigned long" dir="in"> … … 3599 3607 3600 3608 @todo getHardDiskBootOrder(), getNetworkBootOrder() 3601 </desc> 3602 <param name="order" type="unsigned long" dir="in"> 3609 3610 <result name="E_INVALIDARG"> 3611 Boot @a position out of range. 3612 </result> 3613 3614 </desc> 3615 <param name="position" type="unsigned long" dir="in"> 3603 3616 <desc> 3604 3617 Position in the boot order (<tt>1</tt> to the total number of … … 3616 3629 <method name="attachHardDisk2"> 3617 3630 <desc> 3618 Attaches a virtual hard disk identified by the given UUID to a device3619 slot of the specified bus.3631 Attaches a virtual hard disk identified by the given UUID @a id 3632 to a device slot of the specified bus. 3620 3633 3621 3634 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to 3622 3635 specify the primary or secondary IDE controller, respectively. The 3623 SATA bus supports 30 channels, so this parameter can be a number in3624 rang efrom @c 0 to @c 29.3636 SATA bus supports 30 channels, so this parameter can be a number 3637 ranging from @c 0 to @c 29. 3625 3638 3626 3639 For the primary controller of the IDE bus, the @a device number can be … … 3629 3642 always @c 1 because the master device is reserved for the CD-ROM drive. 3630 3643 3631 For the SATA bus, the @a device parameter is not currentlyused and3632 must alwaysbe @c 0.3644 For the SATA bus, the @a device parameter is currently unused and 3645 must be @c 0. 3633 3646 3634 3647 The specified device slot must not have another disk attached to it, or … … 3645 3658 <note> 3646 3659 If the hard disk is being attached indirectly, a new differencing hard 3647 disk will be implicitlycreated for it and attached instead. If the3660 disk will implicitly be created for it and attached instead. If the 3648 3661 changes made to the machine settings (including this indirect 3649 3662 attachment) are later cancelled using <link to="#discardSettings()"/>, 3650 this implicitly created differencing hard disk will be implicitly 3651 deleted. 3652 </note> 3663 this implicitly created differencing hard disk will implicitly 3664 be deleted. 3665 </note> 3666 3667 <result name="E_INVALIDARG"> 3668 SATA device, SATA channel, IDE channel or IDE slot out of range. 3669 </result> 3670 <result name="VBOX_E_INVALID_OBJECT_STATE"> 3671 Attempt to attach hard disk to an unregistered virtual machine. 3672 </result> 3673 <result name="VBOX_E_INVALID_VM_STATE"> 3674 Invalid machine state. 3675 </result> 3676 <result name="VBOX_E_OBJECT_IN_USE"> 3677 Hard disk already attached to this or another virtual machine. 3678 </result> 3679 3653 3680 </desc> 3654 3681 <param name="id" type="uuid" dir="in"> … … 3678 3705 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for 3679 3706 more detailed information about attaching hard disks. 3707 3708 <result name="VBOX_E_OBJECT_NOT_FOUND"> 3709 No hard disk attached to given slot/bus. 3710 </result> 3711 3680 3712 </desc> 3681 3713 <param name="bus" type="StorageBus" dir="in"> … … 3716 3748 <link to="#saveSettings()"/>, if it is the desired action. 3717 3749 </note> 3750 3751 <result name="VBOX_E_INVALID_VM_STATE"> 3752 Attempt to detach hard disk from a running virtual machine. 3753 </result> 3754 <result name="VBOX_E_OBJECT_NOT_FOUND"> 3755 No hard disk attached to given slot/bus. 3756 </result> 3757 <result name="VBOX_E_NOT_SUPPORTED"> 3758 Hard disk format does not support storage deletion. 3759 </result> 3718 3760 3719 3761 </desc>
Note:
See TracChangeset
for help on using the changeset viewer.