Changeset 32180 in vbox
- Timestamp:
- Sep 1, 2010 2:47:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest2.cpp
r31661 r32180 41 41 * first in order to accept all other VMMDev messages! Otherwise you'd get 42 42 * a VERR_NOT_SUPPORTED error. 43 * 44 * VBox version <= 3.2: VMMDevReportGuestInfo must always come first. 43 45 */ 44 46 VMMDevReportGuestInfo2 *pReq = NULL; 47 VMMDevReportGuestInfo *pReq3 = NULL; 45 48 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof (VMMDevReportGuestInfo2), VMMDevReq_ReportGuestInfo2); 46 49 Log(("VBoxGuestReportGuestInfo: VbglGRAlloc VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc)); … … 53 56 pReq->guestInfo.additionsFeatures = 0; /* Not (never?) used. */ 54 57 RTStrCopy(pReq->guestInfo.szName, sizeof(pReq->guestInfo.szName), VBOX_VERSION_STRING); 55 56 rc = VbglGRPerform(&pReq->header); 57 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc)); 58 if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */ 59 rc = VINF_SUCCESS; 60 VbglGRFree(&pReq->header); 61 } 62 63 /* 64 * VMMDevReportGuestInfo acts as a beacon and signals the host that all guest information is 65 * now complete. So always send this report last! 66 */ 67 if (RT_SUCCESS(rc)) 68 { 69 VMMDevReportGuestInfo *pReq3 = NULL; 58 70 59 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq3, sizeof (VMMDevReportGuestInfo), VMMDevReq_ReportGuestInfo); 71 60 Log(("VBoxGuestReportGuestInfo: VbglGRAlloc VMMDevReportGuestInfo completed with rc=%Rrc\n", rc)); … … 75 64 pReq3->guestInfo.osType = enmOSType; 76 65 77 rc = VbglGRPerform(&pReq3->header); 78 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc)); 66 rc = VbglGRPerform(&pReq->header); 67 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc)); 68 if (rc == VERR_NOT_IMPLEMENTED) 69 { 70 /* Compatibility with pre VBox-3.2 hosts -- VMMDevReportGuestInfo2 not implemented. */ 71 rc = VINF_SUCCESS; 72 } 73 if (rc == VERR_NOT_SUPPORTED) 74 { 75 /* Compatibility with VBox 3.2 hosts: 76 * They rely on sending VMMDevReportGuestInfo as the very first request */ 77 rc = VbglGRPerform(&pReq3->header); 78 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc)); 79 rc = VbglGRPerform(&pReq->header); 80 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc)); 81 } 82 else 83 { 84 /* 85 * Hosts newer than VBox 3.2: 86 * VMMDevReportGuestInfo acts as a beacon and signals the host that all 87 * guest information is now complete. So always send this report last! 88 */ 89 rc = VbglGRPerform(&pReq3->header); 90 Log(("VBoxGuestReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc)); 91 } 79 92 VbglGRFree(&pReq3->header); 80 93 } 94 VbglGRFree(&pReq->header); 81 95 } 82 96
Note:
See TracChangeset
for help on using the changeset viewer.