summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_read.c
blob: 150bc1575db99bc05da6b5e953743cdb6073ee0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <sys/types.h>
#include <sys/uio.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/buffer.h>
#include <skalibs/siovec.h>

int buffer_read (int fd, siovec_t const *v, unsigned int n, void *aux)
{
  struct iovec iov[n] ;
  iovec_from_siovec(iov, v, n) ;
  (void)aux ;
  return fd_readv(fd, iov, n) ;
}