Changeset 6345 in vbox for trunk/src/VBox
- Timestamp:
- Jan 11, 2008 5:28:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6301 r6345 733 733 int rc = 0; 734 734 int requestType = 0; 735 if ( Cmd >= VBOXGUEST_IOCTL_VMMREQUEST(0) 736 && Cmd <= VBOXGUEST_IOCTL_VMMREQUEST(0xfff)) 735 if (VBOXGUEST_IOCTL_NUMBER(Cmd) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_VMMREQUEST(0))) 737 736 { 738 737 cbBuf = sizeof(VMMDevRequestHeader); 739 738 requestType = 1; 740 LogFlow((DEVICE_NAME ":VBOXGUEST_IOCTL_VMMREQUEST "));739 LogFlow((DEVICE_NAME ":VBOXGUEST_IOCTL_VMMREQUEST\n")); 741 740 } 742 741 #ifdef VBOX_HGCM 743 else if ( Cmd >= VBOXGUEST_IOCTL_HGCM_CALL(0) 744 && Cmd <= VBOXGUEST_IOCTL_HGCM_CALL(0xfff)) 742 else if (VBOXGUEST_IOCTL_NUMBER(Cmd) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_HGCM_CALL(0))) 745 743 { 746 744 cbBuf = sizeof(VBoxGuestHGCMCallInfo); 747 LogFlow((DEVICE_NAME ":VBOXGUEST_IOCTL_HGCM_CALL")); 745 requestType = 2; 746 LogFlow((DEVICE_NAME ":VBOXGUEST_IOCTL_HGCM_CALL", Cmd)); 748 747 } 749 748 #endif /* VBOX_HGCM */ 749 else if (VBOXGUEST_IOCTL_NUMBER(Cmd) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_LOG(0))) 750 { 751 /** Untested Code. Will be tested soon. */ 752 cbBuf = VBOXGUEST_IOCTL_SIZE(Cmd); 753 LogFlow((DEVICE_NAME ":VBOXGUEST_IOCTL_LOG Cmd=%d cbBuf=%d", Cmd, cbBuf)); 754 char* pszLogMsg = RTMemTmpAlloc(cbBuf); 755 if (RT_UNLIKELY(!pszLogMsg)) 756 { 757 LogRel((DEVICE_NAME ":RTMemAlloc failed to alloc %d bytes\n", cbBuf)); 758 return ENOMEM; 759 } 760 rc = ddi_copyin((void *)pArg, pszLogMsg, cbBuf, Mode); 761 if (rc == 0) 762 Log(("%.*s", cbBuf, pszLogMsg)); 763 else 764 LogRel((DEVICE_NAME ":ddi_copyin failed. rc=%d\n", rc)); 765 RTMemTmpFree(pszLogMsg); 766 } 750 767 else 751 768 { … … 803 820 { 804 821 VMMDevRequestHeader Hdr; 805 rc = ddi_copyin((void *)pArg, &Hdr, sizeof(Hdr), Mode);822 rc = ddi_copyin((void *)pArg, &Hdr, sizeof(Hdr), Mode); 806 823 if (RT_UNLIKELY(rc)) 807 824 {
Note:
See TracChangeset
for help on using the changeset viewer.