Changeset 37577 in vbox
- Timestamp:
- Jun 21, 2011 1:01:00 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72419
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Runtime/r0drv/darwin/mach_kernel-r0drv-darwin.cpp ¶
r37575 r37577 307 307 AssertReturn((RTFOFF)offNative == off, VERR_OUT_OF_RANGE); 308 308 309 309 #if 0 /* Added in 10.6, grr. */ 310 310 errno_t rc; 311 311 if (!pcbRead) … … 320 320 } 321 321 return !rc ? VINF_SUCCESS : RTErrConvertFromErrno(rc); 322 323 #else 324 uio_t hUio = uio_create(1, offNative, UIO_SYSSPACE, UIO_READ); 325 if (!hUio) 326 return VERR_NO_MEMORY; 327 errno_t rc; 328 if (uio_addiov(hUio, (user_addr_t)(uintptr_t)pvBuf, cbToRead) == 0) 329 { 330 rc = VNOP_READ(pThis->hVnode, hUio, 0 /*ioflg*/, pThis->hVfsCtx); 331 if (pcbRead) 332 *pcbRead = cbToRead - uio_resid(hUio); 333 else if (!rc && uio_resid(hUio)) 334 rc = VERR_FILE_IO_ERROR; 335 } 336 else 337 rc = VERR_INTERNAL_ERROR_3; 338 uio_free(hUio); 339 return rc; 340 341 #endif 322 342 } 323 343
Note:
See TracChangeset
for help on using the changeset viewer.