2 * Copyright (c) 2016-2018 The strace developers.
5 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifdef HAVE_LINUX_FIEMAP_H
13 # include <sys/ioctl.h>
14 # include <linux/fiemap.h>
15 # include <linux/fs.h>
17 # include "xlat/fiemap_flags.h"
23 TAIL_ALLOC_OBJECT_CONST_PTR(struct fiemap, args);
25 printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64
26 ", fm_length=%" PRI__u64", fm_flags=",
27 args->fm_start, args->fm_length);
28 printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???");
29 printf(", fm_extent_count=%u})", args->fm_extent_count);
30 ioctl(-1, FS_IOC_FIEMAP, args);
31 printf(" = -1 EBADF (%m)\n");
33 /* The live version of this test is in btrfs.c */
36 /* clone and dedupe ioctls are in btrfs.c since they originated there */
39 main(int argc, char *argv[])
43 puts("+++ exited with 0 +++");
50 SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H")