Пример #1
0
int
sync_file_range (int fd, __off64_t offset, __off64_t len, unsigned int flags)
{
#if defined (__NR_sync_file_range2)
  return SYSCALL_CANCEL (sync_file_range2, fd, flags, SYSCALL_LL64 (offset),
			 SYSCALL_LL64 (len));
#elif defined (__NR_sync_file_range)
  return SYSCALL_CANCEL (sync_file_range, fd,
			 __ALIGNMENT_ARG SYSCALL_LL64 (offset),
			 SYSCALL_LL64 (len), flags);
#endif
}
Пример #2
0
ssize_t
__readahead (int fd, off64_t offset, size_t count)
{
  return INLINE_SYSCALL_CALL (readahead, fd,
			      __ALIGNMENT_ARG SYSCALL_LL64 (offset),
			      count);
}
Пример #3
0
/* Reserve storage for the data of the file associated with FD.  */
int
__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
{
  INTERNAL_SYSCALL_DECL (err);
#ifdef INTERNAL_SYSCALL_TYPES
  int res = INTERNAL_SYSCALL_TYPES (fallocate, err, 4, int, fd,
                                    int, 0, off_t, offset,
                                    off_t, len);
#else
  int res = INTERNAL_SYSCALL_CALL (fallocate, err, fd, 0,
				   SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
#endif
  if (! INTERNAL_SYSCALL_ERROR_P (res, err))
    return 0;
  if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
    return INTERNAL_SYSCALL_ERRNO (res, err);
  return internal_fallocate64 (fd, offset, len);
}
Пример #4
0
/* Reserve storage for the data of the file associated with FD.  */
int
fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
{
  return SYSCALL_CANCEL (fallocate, fd, mode,
			 SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
}
Пример #5
0
/* Truncate PATH to LENGTH bytes.  */
int
__truncate64 (const char *path, off64_t length)
{
  return INLINE_SYSCALL_CALL (truncate64, path,
			      __ALIGNMENT_ARG SYSCALL_LL64 (length));
}