Zhen Ren
2015-Sep-11 09:48 UTC
[Ocfs2-users] [Ocfs2-tools-devel] [PATCH 02/10] Remove splice() from api-compat
Hi Junxiao, Good catch, Thanks! -- Eric Ren >>>> Hi Eric, > > On 09/10/2015 02:54 PM, zren at suse.com wrote: > > From: Goldwyn Rodrigues <rgoldwyn at suse.com> > > > > splice() is available in later kernels and is not required. > > > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.com> > > Reviewed-by: Eric Ren <zren at suse.com> > > --- > > api-compat/include/splice.h | 37 ------------------------------------- > > configure.in | 5 ----- > > 2 files changed, 42 deletions(-) > > delete mode 100644 api-compat/include/splice.h > > > > diff --git a/api-compat/include/splice.h b/api-compat/include/splice.h > This file is still referenced in api-compat/include/Makefile and > Makefile, need remove? > > Thanks, > Junxiao. > > > deleted file mode 100644 > > index 08966c1..0000000 > > --- a/api-compat/include/splice.h > > +++ /dev/null > > @@ -1,37 +0,0 @@ > > -#ifndef API_SPLICE_H > > -#define API_SPLICE_H > > - > > -#include <unistd.h> > > -#include <fcntl.h> > > - > > -#if defined(__i386__) > > - > > -#define __NR_splice 313 > > - > > -#elif defined(__x86_64__) > > - > > -#define __NR_splice 275 > > - > > -#elif defined(__powerpc__) > > - > > -#define __NR_splice 283 > > - > > -#elif defined(__s390__) > > - > > -#define __NR_splice 306 > > - > > -#elif defined(__ia64__) > > - > > -#define __NR_splice 1297 > > - > > -#else > > -#error unsupported arch > > -#endif > > - > > -int splice(int fdin, loff_t *off_in, int fdout, > > - loff_t *off_out, size_t len, unsigned int flags) > > -{ > > - return syscall(__NR_splice, fdin, off_in, fdout, off_out, len, flags); > > -} > > - > > -#endif > > diff --git a/configure.in b/configure.in > > index ef54d37..57800d7 100644 > > --- a/configure.in > > +++ b/configure.in > > @@ -130,11 +130,6 @@ AM_PATH_PYTHON(2.3, , AC_MSG_ERROR([could not find > Python 2.3 or higher.])) > > API_COMPAT_HEADERS="" > > API_COMPAT_CFLAGS="" > > > > -splice_compat_header="" > > -OCFS2_CHECK_HEADERS([splice() in bits/fcntl.h], bits/fcntl.h, > > - , splice_compat_header="splice.h", [splice (int __fdin]) > > -API_COMPAT_HEADERS="$API_COMPAT_HEADERS $splice_compat_header" > > - > > NO_REFLINK= > > OCFS2_CHECK_HEADERS([reflink() in unistd.h], unistd.h, , > > NO_REFLINK=yes, [reflink]) > > > > >