<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v7.5</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.5</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-08-14T15:10:53Z</updated>
<entry>
<title>cp,mv: fix issues with preserving timestamps of copied symlinks</title>
<updated>2009-08-14T15:10:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-08-13T09:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f0a1f0df2295aaed418f201bbec67df120e1ac17'/>
<id>urn:sha1:f0a1f0df2295aaed418f201bbec67df120e1ac17</id>
<content type='text'>
* src/copy.c (copy_internal): On systems without utimensat don't
use utimens on a symlink, as that would dereference the symlink.
* tests/cp/abuse: To work around possible attribute preservation
failures breaking the test, use cp -dR rather than cp -a.
</content>
</entry>
<entry>
<title>cp: accept the --reflink option</title>
<updated>2009-08-07T15:14:22Z</updated>
<author>
<name>Giuseppe Scrivano</name>
<email>gscrivano@gnu.org</email>
</author>
<published>2009-08-01T17:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a1d7469835371ded0ad8e3496bc5a5bebf94ccef'/>
<id>urn:sha1:a1d7469835371ded0ad8e3496bc5a5bebf94ccef</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>cp -pP (and e.g., -a): preserve time stamps on symlinks, too</title>
<updated>2009-08-04T15:38:54Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-07-27T15:08:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=eae535e1a322e244248bd31ed7e21ac95ecaa16d'/>
<id>urn:sha1:eae535e1a322e244248bd31ed7e21ac95ecaa16d</id>
<content type='text'>
* src/copy.c (utimensat_if_possible): New function.
(copy_internal): Remove variable, "preserve_metadata".
Replace with "dest_is_symlink".  That covers all cases but one:
the one in which cp --link has created hard links to non-directories.
In that case, there is no need to update attributes of the links.
Use utimensat_if_possible, to preserve timestamps of symlinks.
* NEWS (New features): Mention this.
* tests/Makefile.am (TESTS): Add cp/preserve-slink-time.
* tests/cp/preserve-slink-time: New file.
* m4/jm-macros.m4 (coreutils_MACROS): Test for utimensat.
Reported in http://bugzilla.redhat.com/230866
</content>
</entry>
<entry>
<title>cp: support btrfs' copy-on-write file clone operation</title>
<updated>2009-07-29T10:15:50Z</updated>
<author>
<name>Giuseppe Scrivano</name>
<email>gscrivano@gnu.org</email>
</author>
<published>2009-07-25T14:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=45330176690b079ed47ac7c58f29a1b028f97b07'/>
<id>urn:sha1:45330176690b079ed47ac7c58f29a1b028f97b07</id>
<content type='text'>
* src/copy.c [HAVE_SYS_IOCTL_H]: Include &lt;sys/ioctl.h&gt;.
(BTRFS_IOCTL_MAGIC, BTRFS_IOC_CLONE): Define.
(clone_file): New function.
(copy_reg): Use the btrfs clone operation if possible.
</content>
</entry>
<entry>
<title>copy.c: remove a duplicate expression</title>
<updated>2009-07-08T21:59:56Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-07-08T16:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ad7b37bfd4bd5f1840f0f9039a819cafb83a3b53'/>
<id>urn:sha1:ad7b37bfd4bd5f1840f0f9039a819cafb83a3b53</id>
<content type='text'>
* src/copy.c (copy_attr_error): remove a redundant expression
added in commit e0cf592f, 2009-04-27, "factor out test for errno ...".
</content>
</entry>
<entry>
<title>copy.c: factor out test for errno value indicating "unsupported"</title>
<updated>2009-04-27T11:33:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-04-27T09:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e0cf592f48b4e67dc31d0482ae4f4dbc820e883e'/>
<id>urn:sha1:e0cf592f48b4e67dc31d0482ae4f4dbc820e883e</id>
<content type='text'>
* src/copy.c (errno_unsupported): New function.
(copy_attr_error, copy_internal): Use it.
</content>
</entry>
<entry>
<title>cp -a: diagnose failure when preserving xattr/context required</title>
<updated>2009-04-27T11:33:42Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-04-24T12:29:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1fa226772cb25c9b2bc17480ddb30bb3dd569951'/>
<id>urn:sha1:1fa226772cb25c9b2bc17480ddb30bb3dd569951</id>
<content type='text'>
* src/copy.c (copy_attr_by_fs): Always print diagnostics when preserving
xattrs is required.
(copy_attr_by_name): Likewise.
(copy_reg): Always print diagnostics when preserving SELinux
context is required.
(copy_internal): Likewise.  Also, do not ignore ENOTSUP and ENODATA
errors when preserving SELinux context is required.
* NEWS (Bug fixes): Mention it.
</content>
</entry>
<entry>
<title>mv: ignore xattr-preservation failure when not supported by filesystem</title>
<updated>2009-04-27T11:26:03Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-04-17T09:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=941bd48235cceceb4f1c072e06a4bedd14b5e0b5'/>
<id>urn:sha1:941bd48235cceceb4f1c072e06a4bedd14b5e0b5</id>
<content type='text'>
*src/copy.c: Do not warn about xattr-preservation failure when xattrs
are not supported and preservation of xattrs is not explicitly required.
Reported by Eric Sandeen in http://bugzilla.redhat.com/496142
</content>
</entry>
<entry>
<title>cp: work around linux kernel bug: short-read != EOF on /proc</title>
<updated>2009-04-22T19:52:11Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-04-17T16:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c74fbaefebe91ca60e3a8582613a3714c740df65'/>
<id>urn:sha1:c74fbaefebe91ca60e3a8582613a3714c740df65</id>
<content type='text'>
Remove the optimization that avoided up to 50% of cp's read syscalls.
Do not assume that a short read on a regular file indicates EOF.
When reading from a file in /proc on linux [at least 2.6.9 - 2.6.29]
into a 4k-byte buffer or larger, a short read does not
always indicate EOF.  For example, "cp /proc/slabinfo /tmp"
copies only 4068 of the total 7493 bytes.  This optimization
(25719a33154f0c62ea9881f0c79ae312dd4cec7a, Improve performance a bit
by optimizing away; 2005-11-24) appears to have been worth less than
a 2% speed-up (and usually much less), so the impact of removing it
is negligible.

* src/copy.c (copy_reg): Don't exit the loop early.
* tests/cp/proc-short-read: New test, lightly based on a suggestion
from Mike Frysinger, to exercise this fix.
* tests/Makefile.am (TESTS): Add cp/proc-short-read.
* NEWS (Improve robustness): Mention this change.
</content>
</entry>
<entry>
<title>cp: make -a option preserve xattrs, but with reduced diagnostics</title>
<updated>2009-03-11T16:32:44Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-03-11T15:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c160afe902c07f5052dbd97c726a997db7fa20c0'/>
<id>urn:sha1:c160afe902c07f5052dbd97c726a997db7fa20c0</id>
<content type='text'>
* copy.c (copy_attr_by_fd): Reduce xattr diagnostics for 'cp -a'.
(copy_attr_by_name): Likewise.
* cp.c (main): Preserve xattrs with -a option, when possible.
* doc/coreutils.texi: Document that xattrs are preserved with
cp -a, with no added diagnostics.
* NEWS: Mention the change.
* tests/misc/xattr: Add tests for 'cp --preserve=all' and 'cp -a'.
</content>
</entry>
</feed>
