summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_write.c
blob: b924cbb60502f31ed8d1224f33d85a5bc50b93db (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <skalibs/allreadwrite.h>
#include <skalibs/siovec.h>
#include <skalibs/buffer.h>

int buffer_write (int fd, siovec_t const *v, unsigned int n)
{
  unsigned int w = allreadwritev(&fd_writesv, fd, v, n) ;
  return w ? (int)w : -1 ;
}