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/iobufferk_isworking.c | |
parent | 754da814c32de5fbbd8b065e9f106cbb7bfc8ae6 (diff) | |
download | skalibs-f268a8871a061395633d943e6f177fa8f8008963.tar.xz |
Axe iobuffer
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/iobufferk_isworking.c')
-rw-r--r-- | src/libstddjb/iobufferk_isworking.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libstddjb/iobufferk_isworking.c b/src/libstddjb/iobufferk_isworking.c deleted file mode 100644 index 119d130..0000000 --- a/src/libstddjb/iobufferk_isworking.c +++ /dev/null @@ -1,47 +0,0 @@ -/* ISC license. */ - -#include <skalibs/sysdeps.h> - -#ifdef SKALIBS_HASSPLICE - -#include <skalibs/nonposix.h> -#include <errno.h> -#include <fcntl.h> -#include <skalibs/iobuffer.h> - -int iobufferk_isworking (iobufferk *k) -{ - /* for now splice() with a length of 0 returns 0 no matter what, so this */ - /* test is useless. splice() should test the underlying filesystems even */ - /* if the length is 0. */ - -# if 0 - - int e = errno ; - if (splice(k->fd[0], 0, k->p[1], 0, 0, 0) < 0) goto no ; - if (splice(k->p[0], 0, k->fd[1], 0, 0, 0) < 0) goto no ; - errno = e ; - return 1 ; - no: - errno = e ; - return 0 ; - -# else - - (void)k ; - return 1 ; - -# endif -} - -#else - -#include <skalibs/iobuffer.h> - -int iobufferk_isworking (iobufferk *k) -{ - (void)k ; - return 0 ; -} - -#endif |