diff options
Diffstat (limited to 'qa/btrfs/clone_range.c')
-rw-r--r-- | qa/btrfs/clone_range.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/qa/btrfs/clone_range.c b/qa/btrfs/clone_range.c deleted file mode 100644 index 0a88e160131..00000000000 --- a/qa/btrfs/clone_range.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <fcntl.h> -#include <stdlib.h> -#include <sys/ioctl.h> -#include <string.h> - -#include <linux/types.h> -#include "../../src/os/btrfs_ioctl.h" -#include <stdio.h> -#include <errno.h> - -int main(int argc, char **argv) -{ - struct btrfs_ioctl_clone_range_args ca; - int dfd; - int r; - - if (argc < 6) { - printf("usage: %s <srcfn> <srcoffset> <srclen> <destfn> <destoffset>\n", argv[0]); - exit(1); - } - - ca.src_fd = open(argv[1], O_RDONLY); - ca.src_offset = atoi(argv[2]); - ca.src_length = atoi(argv[3]); - dfd = open(argv[4], O_WRONLY|O_CREAT); - ca.dest_offset = atoi(argv[5]); - - r = ioctl(dfd, BTRFS_IOC_CLONE_RANGE, &ca); - printf("clone_range %s %lld %lld~%lld to %s %d %lld = %d %s\n", - argv[1], ca.src_fd, - ca.src_offset, ca.src_length, - argv[4], dfd, - ca.dest_offset, r, strerror(errno)); - return r; -} |