7 int fd
= open("foo", O_RDWR
|O_CREAT
, 0666);
9 posix_fadvise( fd
, 0, 4096, POSIX_FADV_WILLNEED
);
10 posix_fadvise( fd
, 0, 0, POSIX_FADV_NOREUSE
);
13 posix_fadvise( badfd
, 0, 4096, POSIX_FADV_WILLNEED
);
16 posix_fadvise(x
, 1, 2, POSIX_FADV_NORMAL
);
17 posix_fadvise(badfd
, x
, 2, POSIX_FADV_NORMAL
);
18 posix_fadvise(badfd
, 1, x
, POSIX_FADV_NORMAL
);
19 posix_fadvise(badfd
, 1, 2, x
);
21 x
= posix_fadvise(badfd
22 , 1, 2, POSIX_FADV_NORMAL
);
25 fprintf(stderr
, "Unexpected return value: %d\n", x
);