summaryrefslogtreecommitdiffstats
path: root/ftrunctest.c
blob: c8b4a0528bd8a450ccbafd499d27b50145019164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <string.h>

int main(int argc, char *argv[])
{
  int fd;

  fd = open("ftrunc.dat", O_RDWR|O_CREAT, 0666);
  ftruncate(fd, 1024*1024*1024);
  close(fd);

  return 0;
}