| #define _GNU_SOURCE | |
| #include <fcntl.h> | |
| #include <limits.h> | |
| #include <sys/ioctl.h> | |
| #include <sys/stat.h> | |
| #include <sys/types.h> | |
| #include <linux/fs.h> | |
| int main(int argc, char **argv) | |
| { | |
| struct file_dedupe_range file_dedupe_range = { | |
| .dest_count = USHRT_MAX, | |
| }; | |
| int fd; | |
| fd = open("/tmp/", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR); | |
| ioctl(fd, FIDEDUPERANGE, &file_dedupe_range); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment