Beispiel #1
0
/* Truncate PATH to LENGTH bytes.  */
int
__truncate (const char *path, off_t length)
{
  return INLINE_SYSCALL (truncate64, __ALIGNMENT_COUNT (3, 4), path,
                         __ALIGNMENT_ARG
                         __LONG_LONG_PAIR (length >> 31, length));
}
Beispiel #2
0
/* Truncate the file FD refers to to LENGTH bytes.  */
int
__ftruncate64 (int fd, off64_t length)
{
  unsigned int low = length & 0xffffffff;
  unsigned int high = length >> 32;
  return INLINE_SYSCALL (ftruncate64, __ALIGNMENT_COUNT (3, 4), fd,
                         __ALIGNMENT_ARG __LONG_LONG_PAIR (high, low));
}
Beispiel #3
0
static ssize_t
do_preadv (int fd, const struct iovec *vector, int count, off_t offset)
{
  assert (sizeof (offset) == 4);
  return INLINE_SYSCALL (preadv, __ALIGNMENT_COUNT (5, 6), fd,
                         vector, count, __ALIGNMENT_ARG
                         __LONG_LONG_PAIR (offset >> 31, offset));
}
Beispiel #4
0
static ssize_t
do_pwrite (int fd, const void *buf, size_t count, off_t offset)
{
  assert (sizeof (offset) == 4);
  return INLINE_SYSCALL (pwrite64, __ALIGNMENT_COUNT (5, 6), fd,
                         buf, count, __ALIGNMENT_ARG
                         __LONG_LONG_PAIR (offset >> 31, offset));
}
Beispiel #5
0
/* Truncate the file PATH to LENGTH bytes.  */
int
truncate64 (const char *path, off64_t length)
{
  unsigned int low = length & 0xffffffff;
  unsigned int high = length >> 32;
  return INLINE_SYSCALL (truncate64, __ALIGNMENT_COUNT (3, 4), path,
                         __ALIGNMENT_ARG __LONG_LONG_PAIR (high, low));
}