diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-09-25 19:48:26 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-09-25 19:48:26 +0000 |
commit | f268a8871a061395633d943e6f177fa8f8008963 (patch) | |
tree | c01e2ddf63e4934ced4eb34764b520bd47070e08 /src/libstddjb/iobuffer_kfromu.c | |
parent | 754da814c32de5fbbd8b065e9f106cbb7bfc8ae6 (diff) | |
download | skalibs-f268a8871a061395633d943e6f177fa8f8008963.tar.xz |
Axe iobuffer
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/iobuffer_kfromu.c')
-rw-r--r-- | src/libstddjb/iobuffer_kfromu.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/libstddjb/iobuffer_kfromu.c b/src/libstddjb/iobuffer_kfromu.c deleted file mode 100644 index 91525a5..0000000 --- a/src/libstddjb/iobuffer_kfromu.c +++ /dev/null @@ -1,38 +0,0 @@ -/* ISC license. */ - -#include <skalibs/sysdeps.h> - -#ifdef SKALIBS_HASSPLICE - -#include <skalibs/nonposix.h> -#include <fcntl.h> -#include <sys/uio.h> -#include <skalibs/buffer.h> -#include <skalibs/iobuffer.h> - -int iobuffer_kfromu (iobufferk *k, iobufferu *u) -{ - struct iovec v[2] ; - ssize_t r ; - buffer_rpeek(&u->b[0], v) ; - r = vmsplice(k->p[1], v, 2, 0) ; - if (r < 0) return 0 ; - k->n += r ; - buffer_rseek(&u->b[0], r) ; - u->b[1].c.p = u->b[0].c.p ; - return iobufferu_isempty(u) ; -} - -#else - -#include <errno.h> -#include <skalibs/iobuffer.h> - -int iobuffer_kfromu (iobufferk *k, iobufferu *u) -{ - (void)k ; - (void)u ; - return (errno = ENOSYS, 0) ; -} - -#endif |