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

Function sys_write

freebsd/kern/sys_generic.c:392–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390};
391#endif
392int
393sys_write(struct thread *td, struct write_args *uap)
394{
395 struct uio auio;
396 struct iovec aiov;
397 int error;
398
399 if (uap->nbyte > IOSIZE_MAX)
400 return (EINVAL);
401 aiov.iov_base = (void *)(uintptr_t)uap->buf;
402 aiov.iov_len = uap->nbyte;
403 auio.uio_iov = &aiov;
404 auio.uio_iovcnt = 1;
405 auio.uio_resid = uap->nbyte;
406 auio.uio_segflg = UIO_USERSPACE;
407 error = kern_writev(td, uap->fd, &auio);
408 return (error);
409}
410
411/*
412 * Positioned write system call.

Callers

nothing calls this directly

Calls 1

kern_writevFunction · 0.85

Tested by

no test coverage detected