Skip to content

Commit

Permalink
SEEK_HOLE not supported on CentOS 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrens committed May 7, 2018
1 parent 4f57843 commit c1d6370
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/zfs-tests/cmd/getholes/getholes.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#define PRINT_DATA 0x2
#define PRINT_VERBOSE 0x4

#ifdef SEEK_HOLE

static void
usage(char *msg, int exit_value)
{
Expand Down Expand Up @@ -207,3 +209,13 @@ main(int argc, char *argv[])
list_destroy(&seg_list);
return (0);
}

#else
int
main(int argc, char *argv[])
{
fprintf(stderr,
"error: SEEK_DATA / SEEK_HOLE not supported by this kernel\n");
return (1);
}
#endif

0 comments on commit c1d6370

Please sign in to comment.