]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: use FICLONE instead of BTRFS_IOC_CLONE
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 9 Sep 2016 22:28:31 +0000 (15:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 9 Sep 2016 22:29:07 +0000 (15:29 -0700)
commit89e1fef97cfa4a9b6784d091c992a4b1e05b9a92
tree465c8ae0398a1a903a508a0b4ce48139364d2b9f
parentc6389a1340cdc2a74dbbba5db13df009ada3c04c
cp: use FICLONE instead of BTRFS_IOC_CLONE

This doesn't affect the generated code on my system; it's merely
a cleaner way to use the recently-introduced Linux-specific API.
* m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Check for linux/fs.h.
* src/copy.c: Include <linux.fs.h> if available.
(FICLONE) [__linux__]: Define if not already defined.
(clone_file): Use FICLONE instead of the older BTRFS_IOC_CLONE,
as this ioctl is no longer btrfs-specific.
m4/jm-macros.m4
src/copy.c