ocfs2-tools/reflink-no-syscall.patch
OBS User autobuild b08edf399e Accepting request 42253 from network:ha-clustering:Factory
Copy from network:ha-clustering:Factory/ocfs2-tools based on submit request 42253 from user tserong

OBS-URL: https://build.opensuse.org/request/show/42253
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=25
2010-06-30 08:45:00 +00:00

58 lines
1.5 KiB
Diff

Index: reflink/coreutils-6.9/src/ln.c
===================================================================
--- reflink.orig/coreutils-6.9/src/ln.c
+++ reflink/coreutils-6.9/src/ln.c
@@ -152,52 +152,6 @@ target_directory_operand (char const *fi
return is_a_dir;
}
-#ifndef HAVE_REFLINK
-# ifndef HAVE_REFLINKAT
-# include <sys/syscall.h>
-
-# ifndef SYS_reflinkat
-# ifdef __i386__
-# define __NR_reflinkat 337
-# endif
-# ifdef __x86_64__
-# define __NR_reflinkat 299
-# endif
-# define SYS_reflinkat __NR_reflinkat
-# endif /* SYS_reflinkat */
-
-# ifdef SYS_reflinkat
-static int reflinkat(int olddirfd, const char *oldpath,
- int newdirfd, const char *newpath,
- int preserve, int flags)
-{
- return syscall(SYS_reflinkat, olddirfd, oldpath, newdirfd, newpath,
- preserve, flags);
-}
-# else
-static int reflinkat(int olddirfd, const char *oldpath,
- int newdirfd, const char *newpath,
- int preserve, int flags)
-{
- return -ENOSYS;
-}
-# endif /* SYS_reflinkat */
-# endif /* HAVE_REFLINKAT */
-
-/*
- * We've now defined reflinkat of some sort. We can use it to build
- * reflink.
- */
-# ifndef AT_FDCWD
-# define AT_FDCWD -100
-# endif
-static int reflink(const char *oldpath, const char *newpath,
- int preserve)
-{
- return reflinkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, preserve, 0);
-}
-#endif /* HAVE_REFLINK */
-
#ifndef REFLINK_ATTR_NONE
# define REFLINK_ATTR_NONE 0
#endif