summaryrefslogtreecommitdiff
path: root/userland/libc/sys/sendfile.c
blob: 9de931b1a642120aacdfbdfbb505cffc071f2445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <errno.h>
#include <sys/sendfile.h>
#include <syscall.h>

u32 sendfile(int out_fd, int in_fd, off_t *offset, size_t count,
             int *error_rc) {
  u32 r = syscall(SYS_SENDFILE, out_fd, in_fd, offset, count, error_rc);
  if (error_rc) {
    errno = -1 * *error_rc;
  }
  return r;
}