From a1d7469835371ded0ad8e3496bc5a5bebf94ccef Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sat, 1 Aug 2009 19:36:48 +0200 Subject: 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. --- tests/cp/sparse | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/cp') diff --git a/tests/cp/sparse b/tests/cp/sparse index bd1a84f40..9683a9e33 100755 --- a/tests/cp/sparse +++ b/tests/cp/sparse @@ -38,4 +38,8 @@ cp --sparse=always sparse copy || fail=1 # Ensure that the copy has the same block count as the original. test `stat --printf %b copy` -le `stat --printf %b sparse` || fail=1 +# Ensure that --sparse={always,never} with --reflink fail. +cp --sparse=always --reflink sparse copy && fail=1 +cp --sparse=never --reflink sparse copy && fail=1 + Exit $fail -- cgit v1.2.3-70-g09d2