Home | History | Annotate | Download | only in mips64
      1 #include <errno.h>
      2 #include <fcntl.h>
      3 #include <stdio.h>
      4 
      5 #define BAD_FD 42
      6 
      7 int main() {
      8    int x;
      9 
     10    (void)posix_fadvise(x,      1, 2, POSIX_FADV_NORMAL);
     11    (void)posix_fadvise(BAD_FD, x, 2, POSIX_FADV_NORMAL);
     12    (void)posix_fadvise(BAD_FD, 1, x, POSIX_FADV_NORMAL);
     13    (void)posix_fadvise(BAD_FD, 1, 2, x);
     14 
     15    x = posix_fadvise(BAD_FD, 1, 2, POSIX_FADV_NORMAL);
     16 
     17    if (x != EBADF)
     18       fprintf(stderr, "Unexpected return value: %d\n", x);
     19 
     20    return 0;
     21 }
     22