1 /* Simple test program for checking O_APPEND writes (see append_writer.c)
3 * Contributed by hatakeyama@bsd.tnes.nec.co.jp
10 #include <sys/param.h>
13 int main(int argc, char **argv)
23 if ((fd = open(file, O_RDONLY, 0600)) == -1) {
24 perror("couldn't open");
29 if ((rc = read(fd, &d, sizeof(d))) != sizeof(i)) {
32 perror("couldn't read");
37 fprintf(stderr, "bad data, offset = %u", i * 4);