Changeset 31241 in vbox for trunk/src/VBox
- Timestamp:
- Jul 30, 2010 12:50:58 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64255
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/Helper.cpp
r30758 r31241 204 204 if (RT_SUCCESS(rc)) 205 205 { 206 pReq->guestInfo. additionsVersion = VMMDEV_VERSION;206 pReq->guestInfo.interfaceVersion = VMMDEV_VERSION; 207 207 208 208 /* we've already determined the Windows product before */ -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r30780 r31241 270 270 if (RT_SUCCESS(rc)) 271 271 { 272 pReq->guestInfo. additionsVersion = VMMDEV_VERSION;272 pReq->guestInfo.interfaceVersion = VMMDEV_VERSION; 273 273 pReq->guestInfo.osType = enmOSType; 274 274 rc = VbglGRPerform(&pReq->header); -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r30857 r31241 59 59 #define VMMDEVSTATE_2_DEVINS(pVMMDevState) ( (pVMMDevState)->pDevIns ) 60 60 61 #define VBOX_GUEST_ ADDITIONS_VERSION_1_03(s) \62 ( RT_HIWORD((s)->guestInfo. additionsVersion) == 1 \63 && RT_LOWORD((s)->guestInfo. additionsVersion) == 3 )64 65 #define VBOX_GUEST_ ADDITIONS_VERSION_OK(additionsVersion) \61 #define VBOX_GUEST_INTERFACE_VERSION_1_03(s) \ 62 ( RT_HIWORD((s)->guestInfo.interfaceVersion) == 1 \ 63 && RT_LOWORD((s)->guestInfo.interfaceVersion) == 3 ) 64 65 #define VBOX_GUEST_INTERFACE_VERSION_OK(additionsVersion) \ 66 66 ( RT_HIWORD(additionsVersion) == RT_HIWORD(VMMDEV_VERSION) \ 67 67 && RT_LOWORD(additionsVersion) <= RT_LOWORD(VMMDEV_VERSION) ) 68 68 69 #define VBOX_GUEST_ ADDITIONS_VERSION_OLD(additionsVersion) \69 #define VBOX_GUEST_INTERFACE_VERSION_OLD(additionsVersion) \ 70 70 ( (RT_HIWORD(additionsVersion) < RT_HIWORD(VMMDEV_VERSION) \ 71 71 || ( RT_HIWORD(additionsVersion) == RT_HIWORD(VMMDEV_VERSION) \ 72 72 && RT_LOWORD(additionsVersion) <= RT_LOWORD(VMMDEV_VERSION) ) ) 73 73 74 #define VBOX_GUEST_ ADDITIONS_VERSION_TOO_OLD(additionsVersion) \74 #define VBOX_GUEST_INTERFACE_VERSION_TOO_OLD(additionsVersion) \ 75 75 ( RT_HIWORD(additionsVersion) < RT_HIWORD(VMMDEV_VERSION) ) 76 76 77 #define VBOX_GUEST_ ADDITIONS_VERSION_NEW(additionsVersion) \77 #define VBOX_GUEST_INTERFACE_VERSION_NEW(additionsVersion) \ 78 78 ( RT_HIWORD(additionsVersion) > RT_HIWORD(VMMDEV_VERSION) \ 79 79 || ( RT_HIWORD(additionsVersion) == RT_HIWORD(VMMDEV_VERSION) \ … … 185 185 Log3(("VMMDevNotifyGuest_EMT: u32EventMask = 0x%08X.\n", u32EventMask)); 186 186 187 if (VBOX_GUEST_ ADDITIONS_VERSION_1_03 (pVMMDevState))187 if (VBOX_GUEST_INTERFACE_VERSION_1_03 (pVMMDevState)) 188 188 { 189 189 Log3(("VMMDevNotifyGuest_EMT: Old additions detected.\n")); … … 487 487 488 488 /* Check additions version */ 489 pThis->fu32AdditionsOk = VBOX_GUEST_ ADDITIONS_VERSION_OK(pThis->guestInfo.additionsVersion);489 pThis->fu32AdditionsOk = VBOX_GUEST_INTERFACE_VERSION_OK(pThis->guestInfo.interfaceVersion); 490 490 491 491 LogRel(("Guest Additions information report: Interface = 0x%08X osType = 0x%08X\n", 492 pThis->guestInfo. additionsVersion,492 pThis->guestInfo.interfaceVersion, 493 493 pThis->guestInfo.osType)); 494 494 pThis->pDrv->pfnUpdateGuestInfo(pThis->pDrv, &pThis->guestInfo); … … 516 516 else 517 517 { 518 VBoxGuestInfo2 *guestInfo2 = &((VMMDevReportGuestInfo2*)pRequestHeader)->guestInfo; 518 VBoxGuestInfo2 *pGuestInfo2 = &((VMMDevReportGuestInfo2*)pRequestHeader)->guestInfo; 519 AssertPtr(pGuestInfo2); 519 520 LogRel(("Guest Additions information report: Version %d.%d.%d r%d '%.*s'\n", 520 guestInfo2->additionsMajor, guestInfo2->additionsMinor, guestInfo2->additionsBuild, 521 guestInfo2->additionsRevision, sizeof(guestInfo2->szName), guestInfo2->szName)); 521 pGuestInfo2->additionsMajor, pGuestInfo2->additionsMinor, pGuestInfo2->additionsBuild, 522 pGuestInfo2->additionsRevision, sizeof(pGuestInfo2->szName), pGuestInfo2->szName)); 523 pThis->pDrv->pfnUpdateGuestInfo2(pThis->pDrv, pGuestInfo2); 522 524 pRequestHeader->rc = VINF_SUCCESS; 523 525 } … … 1123 1125 else 1124 1126 { 1125 if (VBOX_GUEST_ ADDITIONS_VERSION_1_03 (pThis))1127 if (VBOX_GUEST_INTERFACE_VERSION_1_03 (pThis)) 1126 1128 { 1127 1129 vmmdevSetIRQ_Legacy_EMT (pThis); … … 2603 2605 { 2604 2606 LogRel(("Guest Additions information report: additionsVersion = 0x%08X, osType = 0x%08X\n", 2605 pThis->guestInfo. additionsVersion,2607 pThis->guestInfo.interfaceVersion, 2606 2608 pThis->guestInfo.osType)); 2607 2609 if (pThis->pDrv) … … 2692 2694 /* Reset means that additions will report again. */ 2693 2695 const bool fVersionChanged = pThis->fu32AdditionsOk 2694 || pThis->guestInfo. additionsVersion2696 || pThis->guestInfo.interfaceVersion 2695 2697 || pThis->guestInfo.osType != VBOXOSTYPE_Unknown; 2696 2698 if (fVersionChanged) 2697 2699 Log(("vmmdevReset: fu32AdditionsOk=%d additionsVersion=%x osType=%#x\n", 2698 pThis->fu32AdditionsOk, pThis->guestInfo. additionsVersion, pThis->guestInfo.osType));2700 pThis->fu32AdditionsOk, pThis->guestInfo.interfaceVersion, pThis->guestInfo.osType)); 2699 2701 pThis->fu32AdditionsOk = false; 2700 2702 memset (&pThis->guestInfo, 0, sizeof (pThis->guestInfo)); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r31219 r31241 467 467 VBoxGlobal::tr ("Enabled", "details report (Nested Paging)") : 468 468 VBoxGlobal::tr ("Disabled", "details report (Nested Paging)"); 469 QString addVersion = m.GetGuestPropertyValue("/VirtualBox/GuestAdd/Version"); 470 QString addRevision = m.GetGuestPropertyValue("/VirtualBox/GuestAdd/Revision"); 471 QString addVersionStr; 472 if (!addVersion.isEmpty() && !addRevision.isEmpty()) 473 { 474 QString addInfo = console.GetGuest().GetAdditionsVersion(); 475 addVersionStr = (addInfo.isEmpty() ? "(" : "") 476 + addVersion 477 + " r" 478 + m.GetGuestPropertyValue("/VirtualBox/GuestAdd/Revision") 479 + (addInfo.isEmpty() ? ")" : ""); 480 } 481 else 469 QString addVersionStr = console.GetGuest().GetAdditionsVersion(); 470 if (addVersionStr.isEmpty()) 482 471 addVersionStr = tr ("Not Detected", "guest additions"); 483 472 QString osType = console.GetGuest().GetOSTypeId(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r31219 r31241 825 825 sltCheckRequestedModes(); 826 826 827 /* Check the GA version only in case of additions are active: */ 828 if (!fIsAdditionsActive) 829 return; 830 /* Check the Guest Additions version and warn the user about possible compatibility issues in case if the installed version is outdated. */ 831 CGuest guest = session().GetConsole().GetGuest(); 832 QString strVersion = guest.GetAdditionsVersion(); 833 uint uVersion = strVersion.toUInt(); 834 /** @todo r=bird: This isn't want we want! We want the VirtualBox version of the additions, all three numbers. See @bugref{4084}.*/ 835 QString strRealVersion = QString("%1.%2").arg(RT_HIWORD(uVersion)).arg(RT_LOWORD(uVersion)); 836 QString strExpectedVersion = QString("%1.%2").arg(VMMDEV_VERSION_MAJOR).arg(VMMDEV_VERSION_MINOR); 837 if (RT_HIWORD(uVersion) < VMMDEV_VERSION_MAJOR) 838 { 839 vboxProblem().warnAboutTooOldAdditions(0, strRealVersion, strExpectedVersion); 840 } 841 else if (RT_HIWORD(uVersion) == VMMDEV_VERSION_MAJOR && RT_LOWORD(uVersion) < VMMDEV_VERSION_MINOR) 842 { 843 vboxProblem().warnAboutOldAdditions(0, strRealVersion, strExpectedVersion); 844 } 845 else if (uVersion > VMMDEV_VERSION) 846 { 847 vboxProblem().warnAboutNewAdditions(0, strRealVersion, strExpectedVersion); 848 } 827 /* A check whether the installed Guest Additions on the guest are up-to-date is now 828 * performed by the Guest Additions itself (via VBoxTray/VBoxClient), so no need to 829 * do something here anymore. */ 849 830 } 850 831 -
trunk/src/VBox/Main/ConsoleImpl.cpp
r31220 r31241 4671 4671 /** 4672 4672 * @note Locks this object for reading. 4673 * This notification only is for reporting an incompatible 4674 * Guest Additions interface, *not* the Guest Additions version! 4675 * 4676 * The user will be notified inside the guest if new Guest 4677 * Additions are available (via VBoxTray/VBoxClient). 4673 4678 */ 4674 4679 void Console::onAdditionsOutdated() … … 4678 4683 4679 4684 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4680 4681 /** @todo Use the On-Screen Display feature to report the fact.4682 * The user should be told to install additions that are4683 * provided with the current VBox build:4684 * VBOX_VERSION_MAJOR.VBOX_VERSION_MINOR.VBOX_VERSION_BUILD4685 */4686 4685 } 4687 4686 -
trunk/src/VBox/Main/GuestImpl.cpp
r31219 r31241 1441 1441 /** 1442 1442 * Sets the general Guest Additions information like 1443 * API version and OS type.1443 * API (interface) version and OS type. 1444 1444 * 1445 * @param a Version1445 * @param aInterfaceVersion 1446 1446 * @param aOsType 1447 1447 */ 1448 void Guest::setAdditionsInfo(Bstr a Version, VBOXOSTYPE aOsType)1448 void Guest::setAdditionsInfo(Bstr aInterfaceVersion, VBOXOSTYPE aOsType) 1449 1449 { 1450 1450 AutoCaller autoCaller(this); … … 1454 1454 1455 1455 /* 1456 * Set the Guest Additions API (interface) version.1457 * Note that this is *not* the actual Guest Additions version and may differ!1456 * Note: The Guest Additions API (interface) version is deprecated 1457 * and will not be used anymore! 1458 1458 */ 1459 mData.mAdditionsVersion = aVersion; 1459 1460 1460 /* 1461 1461 * Older Additions rely on the Additions API version whether they … … 1463 1463 * this immediately. 1464 1464 */ 1465 mData.mAdditionsActive = !a Version.isEmpty();1465 mData.mAdditionsActive = !aInterfaceVersion.isEmpty(); 1466 1466 /* 1467 1467 * Older Additions didn't have this finer grained capability bit, … … 1478 1478 1479 1479 mData.mOSTypeId = Global::OSTypeId (aOsType); 1480 } 1481 1482 /** 1483 * Sets the Guest Additions version information details. 1484 * 1485 * @param aAdditionsVersion 1486 * @param aVersionName 1487 */ 1488 void Guest::setAdditionsInfo2(Bstr aAdditionsVersion, Bstr aVersionName) 1489 { 1490 AutoCaller autoCaller(this); 1491 AssertComRCReturnVoid (autoCaller.rc()); 1492 1493 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1494 1495 mData.mAdditionsVersion = aAdditionsVersion; 1480 1496 } 1481 1497 … … 1487 1503 * @param ulFlags 1488 1504 */ 1489 void Guest::setAdditionsStatus 1505 void Guest::setAdditionsStatus(VBoxGuestStatusFacility Facility, VBoxGuestStatusCurrent Status, ULONG ulFlags) 1490 1506 { 1491 1507 AutoCaller autoCaller(this); … … 1507 1523 * @param ulActive 1508 1524 */ 1509 void Guest::setSupportedFeatures 1525 void Guest::setSupportedFeatures(ULONG64 ulCaps, ULONG64 ulActive) 1510 1526 { 1511 1527 AutoCaller autoCaller(this); -
trunk/src/VBox/Main/VMMDevInterface.cpp
r31024 r31241 189 189 * 190 190 * @param pInterface Pointer to this interface. 191 * @param guestInfo Pointer to guest information structure 191 * @param guestInfo Pointer to guest information structure. 192 192 * @thread The emulation thread. 193 193 */ … … 200 200 return; 201 201 202 /* Store that information in IGuest */202 /* Store that information in IGuest. */ 203 203 Guest* guest = pDrv->pVMMDev->getParent()->getGuest(); 204 204 Assert(guest); … … 206 206 return; 207 207 208 if (guestInfo-> additionsVersion != 0)209 { 210 char version[ 20];211 RTStrPrintf(version, sizeof(version), "%d", guestInfo-> additionsVersion);208 if (guestInfo->interfaceVersion != 0) 209 { 210 char version[16]; 211 RTStrPrintf(version, sizeof(version), "%d", guestInfo->interfaceVersion); 212 212 guest->setAdditionsInfo(Bstr(version), guestInfo->osType); 213 213 … … 218 218 pDrv->pVMMDev->getParent()->onAdditionsStateChange(); 219 219 220 if (guestInfo-> additionsVersion < VMMDEV_VERSION)220 if (guestInfo->interfaceVersion < VMMDEV_VERSION) 221 221 pDrv->pVMMDev->getParent()->onAdditionsOutdated(); 222 222 } … … 227 227 * or driver unload. 228 228 */ 229 guest->setAdditionsInfo(Bstr(), guestInfo->osType); 229 guest->setAdditionsInfo(Bstr(), guestInfo->osType); /* Clear interface version + OS type. */ 230 guest->setAdditionsInfo2(Bstr(), Bstr()); /* Clear Guest Additions version. */ 230 231 guest->setAdditionsStatus(VBoxGuestStatusFacility_Unknown, 231 232 VBoxGuestStatusCurrent_Disabled, 232 233 0); /* Flags; not used. */ 234 pDrv->pVMMDev->getParent()->onAdditionsStateChange(); 235 } 236 } 237 238 /** 239 * Reports the detailed Guest Additions version. 240 * Called whenever the Additions issue a guest version report request or the VM is reset. 241 * 242 * @param pInterface Pointer to this interface. 243 * @param guestInfo Pointer to Guest Additions information structure. 244 * @thread The emulation thread. 245 */ 246 DECLCALLBACK(void) vmmdevUpdateGuestInfo2(PPDMIVMMDEVCONNECTOR pInterface, const VBoxGuestInfo2 *guestInfo) 247 { 248 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 249 250 Assert(guestInfo); 251 if (!guestInfo) 252 return; 253 254 /* Store that information in IGuest. */ 255 Guest* guest = pDrv->pVMMDev->getParent()->getGuest(); 256 Assert(guest); 257 if (!guest) 258 return; 259 260 if ( guestInfo->additionsMajor != 0 261 && guestInfo->additionsRevision != 0) 262 { 263 char version[32]; 264 RTStrPrintf(version, sizeof(version), "%d.%d.%dr%ld", guestInfo->additionsMajor, 265 guestInfo->additionsMinor, 266 guestInfo->additionsBuild, 267 guestInfo->additionsRevision); 268 guest->setAdditionsInfo2(Bstr(version), Bstr(guestInfo->szName)); 269 270 /* 271 * Tell the console interface about the event 272 * so that it can notify its consumers. 273 */ 274 pDrv->pVMMDev->getParent()->onAdditionsStateChange(); 275 } 276 else 277 { 278 /* 279 * The guest additions was disabled because of a reset 280 * or driver unload. 281 */ 282 guest->setAdditionsInfo2(Bstr(), Bstr()); 233 283 pDrv->pVMMDev->getParent()->onAdditionsStateChange(); 234 284 } … … 796 846 pData->Connector.pfnUpdateGuestStatus = vmmdevUpdateGuestStatus; 797 847 pData->Connector.pfnUpdateGuestInfo = vmmdevUpdateGuestInfo; 848 pData->Connector.pfnUpdateGuestInfo2 = vmmdevUpdateGuestInfo2; 798 849 pData->Connector.pfnUpdateGuestCapabilities = vmmdevUpdateGuestCapabilities; 799 850 pData->Connector.pfnUpdateMouseCapabilities = vmmdevUpdateMouseCapabilities; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r31227 r31241 7772 7772 <attribute name="additionsVersion" type="wstring" readonly="yes"> 7773 7773 <desc> 7774 Version of the Guest Additions (3 decimal numbers separated 7775 by dots) or empty when the Additions are not installed. The 7776 Additions may also report a version but yet not be active as 7777 the version might be refused by VirtualBox (incompatible) or 7778 other failures occurred. 7774 Version of the Guest Additions including the revision (3 decimal numbers 7775 separated by dots + revision number) installed on the guest or empty 7776 when the Additions are not installed. 7779 7777 </desc> 7780 7778 </attribute> -
trunk/src/VBox/Main/include/GuestImpl.h
r31219 r31241 80 80 #endif 81 81 STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive); 82 #if 083 /** @todo Will replace AdditionsVersion to be more clear. */84 STDMETHOD(COMGETTER(AdditionsAPIVersion)) (BSTR *aAdditionsVersion);85 #endif86 82 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion); 87 /** @todo Remove */83 /** @todo Remove later by replacing it by AdditionsFeatureAvailable(). */ 88 84 STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless); 89 85 STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics); … … 113 109 114 110 // Public methods that are not in IDL (only called internally). 115 void setAdditionsInfo(Bstr aVersion, VBOXOSTYPE aOsType); 111 void setAdditionsInfo(Bstr aInterfaceVersion, VBOXOSTYPE aOsType); 112 void setAdditionsInfo2(Bstr aAdditionsVersion, Bstr aVersionName); 116 113 void setAdditionsStatus(VBoxGuestStatusFacility Facility, VBoxGuestStatusCurrent Status, ULONG ulFlags); 117 114 void setSupportedFeatures(ULONG64 ulCaps, ULONG64 ulActive);
Note:
See TracChangeset
for help on using the changeset viewer.