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

Function sys_read

freebsd/kern/sys_generic.c:191–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189};
190#endif
191int
192sys_read(struct thread *td, struct read_args *uap)
193{
194 struct uio auio;
195 struct iovec aiov;
196 int error;
197
198 if (uap->nbyte > IOSIZE_MAX)
199 return (EINVAL);
200 aiov.iov_base = uap->buf;
201 aiov.iov_len = uap->nbyte;
202 auio.uio_iov = &aiov;
203 auio.uio_iovcnt = 1;
204 auio.uio_resid = uap->nbyte;
205 auio.uio_segflg = UIO_USERSPACE;
206 error = kern_readv(td, uap->fd, &auio);
207 return (error);
208}
209
210/*
211 * Positioned read system call

Callers

nothing calls this directly

Calls 1

kern_readvFunction · 0.85

Tested by

no test coverage detected