- vm_map_size_t tmp_vmsize = vmsize;
- off_t xfer_foffset = foffset;
-
- //LP64todo - works around vn_rdwr_64() 2G limit
- while (tmp_vmsize > 0) {
- vm_map_size_t xfer_vmsize = tmp_vmsize;
- if (xfer_vmsize > INT_MAX)
- xfer_vmsize = INT_MAX;
- error = vn_rdwr_64(UIO_WRITE, vp,
- vmoffset, xfer_vmsize, xfer_foffset,
- (IS_64BIT_PROCESS(p) ? UIO_USERSPACE64 : UIO_USERSPACE32),
- IO_NODELOCKED|IO_UNIT, cred, (int *) 0, p);
- tmp_vmsize -= xfer_vmsize;
- xfer_foffset += xfer_vmsize;
- }
+
+ error = vn_rdwr_64(UIO_WRITE, vp, vmoffset, vmsize, foffset,
+ (IS_64BIT_PROCESS(core_proc) ? UIO_USERSPACE64 : UIO_USERSPACE32),
+ IO_NOCACHE|IO_NODELOCKED|IO_UNIT, cred, (int64_t *) 0, core_proc);
+