Changeset 34897 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2010 3:11:06 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r34878 r34897 2042 2042 2043 2043 /* 2044 * Attach the status driver.2045 */2044 * Attach the status driver. 2045 */ 2046 2046 InsertConfigNode(pInst, "LUN#999", &pLunL0); 2047 2047 InsertConfigString(pLunL0, "Driver", "MainStatus"); … … 2056 2056 if (fEhciEnabled) 2057 2057 { 2058 /* USB 2.0 is only available if the proper ExtPack is installed. */ 2059 Bstr USBExtPackName("Oracle VM VirtualBox Extension Pack"); 2060 ComPtr<IExtPack> ExtPack; 2061 hrc = pConsole->mptrExtPackManager->Find(USBExtPackName.raw(), 2062 ExtPack.asOutParam()); 2063 if (SUCCEEDED(hrc)) 2058 /* 2059 * USB 2.0 is only available if the proper ExtPack is installed. 2060 * 2061 * Note. Configuring EHCI here and providing messages about 2062 * the missing extpack isn't exactly clean, but it is a 2063 * necessary evil to patch over legacy compatability issues 2064 * introduced by the new distribution model. 2065 */ 2066 static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack"; 2067 if (pConsole->mptrExtPackManager->isExtPackUsable(s_pszUsbExtPackName)) 2064 2068 { 2065 2069 InsertConfigNode(pDevices, "usb-ehci", &pDev); … … 2085 2089 else 2086 2090 { 2091 /* Fatal if a saved state is being restored, otherwise ignorable. */ 2087 2092 if (pConsole->mMachineState == MachineState_Restoring) 2088 {2089 /* fatal */2090 2093 return VMSetError(pVM, VERR_NOT_FOUND, RT_SRC_POS, 2091 2094 N_("Implementation of the USB 2.0 controller not found!\n" 2092 2095 "Because the USB 2.0 controller state is part of the saved " 2093 2096 "VM state, the VM cannot be started. To fix " 2094 "this problem, either install the '% lS' or disable USB 2.0 "2097 "this problem, either install the '%s' or disable USB 2.0 " 2095 2098 "support in the VM settings"), 2096 USBExtPackName.raw()); 2097 } 2098 else 2099 { 2100 /* not fatal */ 2101 setVMRuntimeErrorCallbackF(pVM, pConsole, 0, 2102 "ExtPackNoEhci", 2103 N_("Implementation of the USB 2.0 controller not found!\n" 2104 "The device will be disabled. You can ignore this warning " 2105 "but there will be no USB 2.0 support in your VM. To fix " 2106 "this issue, either install the '%lS' or disable USB 2.0 " 2107 "support in the VM settings"), 2108 USBExtPackName.raw()); 2109 } 2099 s_pszUsbExtPackName); 2100 setVMRuntimeErrorCallbackF(pVM, pConsole, 0, "ExtPackNoEhci", 2101 N_("Implementation of the USB 2.0 controller not found!\n" 2102 "The device will be disabled. You can ignore this warning " 2103 "but there will be no USB 2.0 support in your VM. To fix " 2104 "this issue, either install the '%s' or disable USB 2.0 " 2105 "support in the VM settings"), 2106 s_pszUsbExtPackName); 2110 2107 } 2111 2108 } -
trunk/src/VBox/Main/ExtPackManagerImpl.cpp
r34893 r34897 2692 2692 } 2693 2693 2694 /** 2695 * Checks if an extension pack is (present and) usable. 2696 * 2697 * @returns @c true if it is, otherwise @c false. 2698 * @param a_pszExtPack The name of the extension pack. 2699 */ 2700 bool ExtPackManager::isExtPackUsable(const char *a_pszExtPack) 2701 { 2702 AutoCaller autoCaller(this); 2703 HRESULT hrc = autoCaller.rc(); 2704 if (FAILED(hrc)) 2705 return false; 2706 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2707 2708 ExtPack *pExtPack = findExtPack(a_pszExtPack); 2709 return pExtPack != NULL 2710 && pExtPack->m->fUsable; 2711 } 2712 2694 2713 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/include/ExtPackManagerImpl.h
r34893 r34897 228 228 int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary); 229 229 HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack); 230 bool isExtPackUsable(const char *a_pszExtPack); 230 231 /** @} */ 231 232
Note:
See TracChangeset
for help on using the changeset viewer.