summaryrefslogtreecommitdiffstats
path: root/kernel/tests/include/lapi/sync_file_range.h
diff options
context:
space:
mode:
authorManuel Bentele2020-10-23 15:18:01 +0200
committerManuel Bentele2020-10-23 15:18:01 +0200
commitdbb41ce2b7f309d394054a6bd1e33afd578798a5 (patch)
tree6a31092063d9f2fb5ac5720ec6759040e793c3d5 /kernel/tests/include/lapi/sync_file_range.h
parentSet Linux kernel version to unknown if it is not detectable (diff)
downloadxloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.tar.gz
xloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.tar.xz
xloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.zip
Move the source code of all xloop components to the common 'src' directory
Diffstat (limited to 'kernel/tests/include/lapi/sync_file_range.h')
-rw-r--r--kernel/tests/include/lapi/sync_file_range.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/kernel/tests/include/lapi/sync_file_range.h b/kernel/tests/include/lapi/sync_file_range.h
deleted file mode 100644
index 86bfe5d..0000000
--- a/kernel/tests/include/lapi/sync_file_range.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (c) International Business Machines Corp., 2008
- */
-
-#ifndef SYNC_FILE_RANGE_H
-#define SYNC_FILE_RANGE_H
-
-#include <sys/types.h>
-#include "config.h"
-#include "lapi/syscalls.h"
-#include "lapi/abisize.h"
-
-#if !defined(HAVE_SYNC_FILE_RANGE)
-
-#ifdef TST_TEST_H__
-# define TST_SYSCALL tst_syscall
-#else
-# define TST_SYSCALL ltp_syscall
-#endif
-
-/*****************************************************************************
- * Wraper function to call sync_file_range system call
- ******************************************************************************/
-static inline long sync_file_range(int fd, off64_t offset, off64_t nbytes,
- unsigned int flags)
-{
-#if (defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__))
-# ifdef TST_ABI32
-# if __BYTE_ORDER == __BIG_ENDIAN
- return TST_SYSCALL(__NR_sync_file_range2, fd, flags,
- (int)(offset >> 32), (int)offset, (int)(nbytes >> 32),
- (int)nbytes);
-# elif __BYTE_ORDER == __LITTLE_ENDIAN
- return TST_SYSCALL(__NR_sync_file_range2, fd, flags, (int)offset,
- (int)(offset >> 32), nbytes, (int)(nbytes >> 32));
-# endif
-# else
- return TST_SYSCALL(__NR_sync_file_range2, fd, flags, offset, nbytes);
-# endif
-#elif (defined(__s390__) || defined(__s390x__)) && defined(TST_ABI32)
- return TST_SYSCALL(__NR_sync_file_range, fd, (int)(offset >> 32),
- (int)offset, (int)(nbytes >> 32), (int)nbytes, flags);
-#elif defined(__mips__) && defined(TST_ABI32)
-# if __BYTE_ORDER == __BIG_ENDIAN
- return TST_SYSCALL(__NR_sync_file_range, fd, 0, (int)(offset >> 32),
- (int)offset, (int)(nbytes >> 32), (int)nbytes, flags);
-# elif __BYTE_ORDER == __LITTLE_ENDIAN
- return TST_SYSCALL(__NR_sync_file_range, fd, 0, (int)offset,
- (int)(offset >> 32), (int)nbytes, (int)(nbytes >> 32), flags);
-# endif
-#else
- return TST_SYSCALL(__NR_sync_file_range, fd, offset, nbytes, flags);
-#endif
-}
-#endif
-
-#endif /* SYNC_FILE_RANGE_H */