1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2006 by Steven J. Hill <sjhill@realitydiluted.com>
6 * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
8 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
11 #include <sys/syscall.h>
15 /* We should deal with kernel which have a smaller UIO_FASTIOV as well
16 as a very big count. */
17 static ssize_t __NC(readv)(int fd, const struct iovec *vector, int count)
19 ssize_t bytes_read = INLINE_SYSCALL(readv, 3, fd, vector, count);
21 if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
24 /* glibc tries again, but we do not. */
25 /* return __atomic_readv_replacement (fd, vector, count); */
29 CANCELLABLE_SYSCALL(ssize_t, readv, (int fd, const struct iovec *vector, int count),