summaryrefslogtreecommitdiff
path: root/src/copy.h
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivano@gnu.org>2009-08-01 19:36:48 +0200
committerJim Meyering <meyering@redhat.com>2009-08-07 17:14:22 +0200
commita1d7469835371ded0ad8e3496bc5a5bebf94ccef (patch)
tree925945606aa919b7b48603117db6f8ca15e7b551 /src/copy.h
parentff159a605e5bc10fe871109f66cba5ee410c9138 (diff)
downloadcoreutils-a1d7469835371ded0ad8e3496bc5a5bebf94ccef.tar.gz
cp: accept the --reflink option
* NEWS: Mention it. * doc/coreutils.texi (cp invocation): Describe it. * src/copy.h (struct cp_options) [reflink]: New member. * src/copy.c (usage): Describe it. (copy_reg): If reflink is true try to clone the file. (main): Check for --reflink. (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Initialize the new member. * src/mv.c (cp_option_init): Likewise. * tests/cp/sparse: Add a new test case.
Diffstat (limited to 'src/copy.h')
-rw-r--r--src/copy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/copy.h b/src/copy.h
index 8e0b4080e..ddf4f4e2c 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -219,6 +219,9 @@ struct cp_options
such a symlink) and returns false. */
bool open_dangling_dest_symlink;
+ /* If true, attempt to clone the file instead of copying it. */
+ bool reflink;
+
/* This is a set of destination name/inode/dev triples. Each such triple
represents a file we have created corresponding to a source file name
that was specified on the command line. Use it to avoid clobbering