MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kern_pwrite

Function kern_pwrite

freebsd/kern/sys_generic.c:430–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430int
431kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte,
432 off_t offset)
433{
434 struct uio auio;
435 struct iovec aiov;
436 int error;
437
438 if (nbyte > IOSIZE_MAX)
439 return (EINVAL);
440 aiov.iov_base = (void *)(uintptr_t)buf;
441 aiov.iov_len = nbyte;
442 auio.uio_iov = &aiov;
443 auio.uio_iovcnt = 1;
444 auio.uio_resid = nbyte;
445 auio.uio_segflg = UIO_USERSPACE;
446 error = kern_pwritev(td, fd, &auio, offset);
447 return (error);
448}
449
450#if defined(COMPAT_FREEBSD6)
451int

Callers 2

sys_pwriteFunction · 0.85
freebsd6_pwriteFunction · 0.85

Calls 1

kern_pwritevFunction · 0.85

Tested by

no test coverage detected