Changeset 23179 in vbox for trunk/src/VBox/Main
- Timestamp:
- Sep 21, 2009 11:23:12 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r23107 r23179 391 391 */ 392 392 #ifdef VBOX_WITH_EFI 393 /** @todo: implement appropriate getter */394 393 Bstr tmpStr1; 395 394 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/UseEFI"), tmpStr1.asOutParam()); H(); 396 395 BOOL fEfiEnabled = !tmpStr1.isEmpty(); 396 397 /** 398 * @todo: VBoxInternal2/UseEFI extradata will go away soon, and we'll 399 * just use this code 400 */ 401 if (!fEfiEnabled) 402 { 403 FirmwareType_T eType = FirmwareType_Bios; 404 hrc = pMachine->COMGETTER(FirmwareType)(&eType); H(); 405 fEfiEnabled = (eType == FirmwareType_Efi); 406 } 397 407 #else 398 408 BOOL fEfiEnabled = false; -
trunk/src/VBox/Main/MachineImpl.cpp
r22786 r23179 196 196 mClipboardMode = ClipboardMode_Bidirectional; 197 197 mGuestPropertyNotificationPatterns = ""; 198 199 mFirmwareType = FirmwareType_Bios; 198 200 } 199 201 … … 212 214 mStatisticsUpdateInterval != that.mStatisticsUpdateInterval || 213 215 mVRAMSize != that.mVRAMSize || 216 mFirmwareType != that.mFirmwareType || 214 217 mAccelerate3DEnabled != that.mAccelerate3DEnabled || 215 218 mAccelerate2DVideoEnabled != that.mAccelerate2DVideoEnabled || … … 1125 1128 mUserData.backup(); 1126 1129 mUserData->mOSTypeId = osTypeId; 1130 1131 return S_OK; 1132 } 1133 1134 1135 STDMETHODIMP Machine::COMGETTER(FirmwareType) (FirmwareType_T *aFirmwareType) 1136 { 1137 CheckComArgOutPointerValid(aFirmwareType); 1138 1139 AutoCaller autoCaller(this); 1140 CheckComRCReturnRC(autoCaller.rc()); 1141 1142 AutoReadLock alock(this); 1143 1144 *aFirmwareType = mHWData->mFirmwareType; 1145 1146 return S_OK; 1147 } 1148 1149 STDMETHODIMP Machine::COMSETTER(FirmwareType) (FirmwareType_T aFirmwareType) 1150 { 1151 AutoCaller autoCaller(this); 1152 CheckComRCReturnRC(autoCaller.rc()); 1153 AutoWriteLock alock(this); 1154 1155 int rc = checkStateDependency(MutableStateDep); 1156 CheckComRCReturnRC(rc); 1157 1158 mHWData.backup(); 1159 mHWData->mFirmwareType = aFirmwareType; 1127 1160 1128 1161 return S_OK; … … 4928 4961 mHWData->mAccelerate3DEnabled = data.fAccelerate3D; 4929 4962 mHWData->mAccelerate2DVideoEnabled = data.fAccelerate2DVideo; 4963 mHWData->mFirmwareType = data.cFirmwareType; 4930 4964 4931 4965 #ifdef VBOX_WITH_VRDP … … 5620 5654 mData->m_pMachineConfigFile->strDescription = mUserData->mDescription; 5621 5655 mData->m_pMachineConfigFile->strOsType = mUserData->mOSTypeId; 5622 5656 5623 5657 if ( mData->mMachineState == MachineState_Saved 5624 5658 || mData->mMachineState == MachineState_Restoring … … 5766 5800 // memory 5767 5801 data.ulMemorySizeMB = mHWData->mMemorySize; 5802 5803 // firmware 5804 data.cFirmwareType = mHWData->mFirmwareType; 5768 5805 5769 5806 // boot order -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r22866 r23179 974 974 </enum> 975 975 976 <enum 977 name="FirmwareType" 978 uuid="7ceea938-8b49-41e2-bb47-667219c0d586" 979 > 980 <desc> 981 Firmware type. 982 </desc> 983 <const name="Bios" value="1"> 984 <desc>BIOS Firmware.</desc> 985 </const> 986 <const name="Efi" value="2"> 987 <desc>Efi firmware.</desc> 988 </const> 989 </enum> 976 990 977 991 <!-- … … 3973 3987 </interface> 3974 3988 3989 3990 3975 3991 <interface 3976 3992 name="IMachine" extends="$unknown" … … 4196 4212 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes"> 4197 4213 <desc>Object containing all BIOS settings.</desc> 4214 </attribute> 4215 4216 <attribute name="firmwareType" type="FirmwareType"> 4217 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial 4218 bootstrap in this VM.</desc> 4198 4219 </attribute> 4199 4220 -
trunk/src/VBox/Main/include/MachineImpl.h
r22624 r23179 301 301 BOOL mPropertyServiceActive; 302 302 Bstr mGuestPropertyNotificationPatterns; 303 304 FirmwareType_T mFirmwareType; 303 305 }; 304 306 … … 601 603 STDMETHOD(RemoveStorageController (IN_BSTR aName)); 602 604 STDMETHOD(GetStorageControllerByName (IN_BSTR aName, IStorageController **storageController)); 605 STDMETHOD(COMGETTER(FirmwareType)) (FirmwareType_T *aFirmware); 606 STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T aFirmware); 603 607 604 608 // public methods only for internal purposes -
trunk/src/VBox/Main/xml/Settings.cpp
r22866 r23179 954 954 fAccelerate3D(false), 955 955 fAccelerate2DVideo(false), 956 cFirmwareType(FirmwareType_Bios), 956 957 clipboardMode(ClipboardMode_Bidirectional), 957 958 ulMemoryBalloonSize(0), … … 1203 1204 else if (pelmHwChild->nameEquals("Memory")) 1204 1205 pelmHwChild->getAttributeValue("RAMSize", hw.ulMemorySizeMB); 1206 else if (pelmHwChild->nameEquals("Firmware")) 1207 pelmHwChild->getAttributeValue("type", hw.cFirmwareType); 1205 1208 else if (pelmHwChild->nameEquals("Boot")) 1206 1209 { … … 1833 1836 pelmMemory->setAttribute("RAMSize", hw.ulMemorySizeMB); 1834 1837 1838 if (m->sv >= SettingsVersion_v1_8) 1839 { 1840 xml::ElementNode *pelmFirmware = pelmHardware->createChild("Firmware"); 1841 pelmFirmware->setAttribute("type", hw.cFirmwareType); 1842 } 1843 1835 1844 xml::ElementNode *pelmBoot = pelmHardware->createChild("Boot"); 1836 1845 for (BootOrderMap::const_iterator it = hw.mapBootOrder.begin();
Note:
See TracChangeset
for help on using the changeset viewer.