Changeset 6231 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jan 3, 2008 3:28:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6118 r6231 97 97 g_File = hf; 98 98 99 #elif defined(RT_OS_SOLARIS) 99 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) 100 100 RTFILE File; 101 101 int rc = RTFileOpen(&File, VBOXGUEST_DEVICE_NAME, RTFILE_O_READWRITE); … … 105 105 106 106 #else 107 # error port me /** @note isn't it nicer to put a todo error here than to 108 put in a flag which will assert where no-one sees it? */ 107 109 /* the default implemenation. */ 108 110 RTFILE File; … … 242 244 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_WAITEVENT_INTERRUPT_ALL, 0, 0); 243 245 } 246 247 /** 248 * Write to the backdoor logger from ring 3 guest code. 249 * @note this currently does not accept more than 255 bytes of data at 250 * one time. It should probably be rewritten to use pass a pointer 251 * in the IOCtl. 252 * 253 * @returns IPRT status code 254 */ 255 VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb) 256 { 257 int rc = VINF_SUCCESS; 258 259 /* Solaris does not accept more than 255 bytes of data. */ 260 #define STEP 128 261 for (size_t iOffs = 0; (iOffs < cb) && (RT_SUCCESS(rc)); iOffs += STEP) 262 { 263 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cb), (void *) (pch + iOffs), 264 iOffs + STEP < cb ? STEP : cb - iOffs); 265 } 266 #undef STEP 267 return rc; 268 }
Note:
See TracChangeset
for help on using the changeset viewer.