Changeset 6436 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jan 22, 2008 9:24:56 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27404
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6435 r6436 798 798 cbDataReturned = cbBuf; 799 799 } 800 rc = ddi_copyout(pvBuf, (void *)(uintptr_t)ReqWrap.pvDataR3, cbDataReturned, Mode); 801 if (RT_UNLIKELY(rc)) 802 { 803 Log((DEVICE_NAME ":VBoxAddSolarisIOCtl: ddi_copyout failed; pvBuf=%p pArg=%p Cmd=%d. rc=%d\n", pvBuf, pArg, Cmd, rc)); 804 rc = EFAULT; 800 if (cbDataReturned > 0) 801 { 802 rc = ddi_copyout(pvBuf, (void *)(uintptr_t)ReqWrap.pvDataR3, cbDataReturned, Mode); 803 if (RT_UNLIKELY(rc)) 804 { 805 Log((DEVICE_NAME ":VBoxAddSolarisIOCtl: ddi_copyout failed; pvBuf=%p pArg=%p Cmd=%d. rc=%d\n", pvBuf, pArg, Cmd, rc)); 806 rc = EFAULT; 807 } 805 808 } 806 809 } -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r6426 r6436 1091 1091 1092 1092 /** 1093 * Guest backdoor logging. 1094 * 1095 * @returns VBox status code. 1096 * 1097 * @param pch The log message (need not be NULL terminated). 1098 * @param cbData Size of the buffer. 1099 * @param pcbDataReturned Where to store the amount of returned data. Can be NULL. 1100 */ 1101 static int VBoxGuestCommonIOCtl_Log(char *pch, size_t cbData, size_t *pcbDataReturned) 1102 { 1103 Log(("%.*s\n", cbData, pch)); 1104 if (pcbDataReturned) 1105 *pcbDataReturned = 0; 1106 return VINF_SUCCESS; 1107 } 1108 1109 1110 /** 1093 1111 * Common IOCtl for user to kernel and kernel to kernel communcation. 1094 1112 * … … 1158 1176 } 1159 1177 #endif /* VBOX_HGCM */ 1178 else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_LOG(0))) 1179 { 1180 CHECKRET_MIN_SIZE("LOG", 1); 1181 rc = VBoxGuestCommonIOCtl_Log((char *)pvData, cbData, pcbDataReturned); 1182 } 1160 1183 else 1161 1184 { … … 1189 1212 rc = VBoxGuestCommonIOCtl_HGCMDisconnect(pDevExt, pSession, (VBoxGuestHGCMDisconnectInfo *)pvData, pcbDataReturned); 1190 1213 break; 1191 1192 1214 1193 1215 case VBOXGUEST_IOCTL_CLIPBOARD_CONNECT:
Note:
See TracChangeset
for help on using the changeset viewer.