<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-11-19T17:05:33Z</updated>
<entry>
<title>cp: improve status message when omitting directories</title>
<updated>2016-11-19T17:05:33Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-19T11:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f1799198483171c8565a4ff8fc1205d0a52fce37'/>
<id>urn:sha1:f1799198483171c8565a4ff8fc1205d0a52fce37</id>
<content type='text'>
* src/copy.h (cp_options): Add a new flag for install(1).
* src/copy.c (copy_internal): For cp, also output remediation
advice which also indicates why directories aren't copied by default.
The message is unchanged for install(1).
* src/cp.c (cp_option_init): Init install_mode to false.
* src/mv.c (cp_option_init): Likewise.
* src/install.c (cp_option_init): Init install_mode to true.
* tests/install/basic-1.sh: Add a test case.
* tests/cp/link-deref.sh: Adjust test case.
Fixes http://bugs.gnu.org/24958
</content>
</entry>
<entry>
<title>all: use die() rather than error(EXIT_FAILURE)</title>
<updated>2016-10-16T11:23:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-10-15T22:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=492dcb2eb191b844a2fd5e51db3eed85289bea1f'/>
<id>urn:sha1:492dcb2eb191b844a2fd5e51db3eed85289bea1f</id>
<content type='text'>
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
</content>
</entry>
<entry>
<title>cp: use FICLONE instead of BTRFS_IOC_CLONE</title>
<updated>2016-09-09T22:29:07Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2016-09-09T22:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=89e1fef97cfa4a9b6784d091c992a4b1e05b9a92'/>
<id>urn:sha1:89e1fef97cfa4a9b6784d091c992a4b1e05b9a92</id>
<content type='text'>
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 &lt;linux.fs.h&gt; 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.
</content>
</entry>
<entry>
<title>mv: consistently warn about multiply specified source dirs</title>
<updated>2016-01-16T11:40:54Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-16T11:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0d60653001d0fd56b36507ad00615bef18dc95a9'/>
<id>urn:sha1:0d60653001d0fd56b36507ad00615bef18dc95a9</id>
<content type='text'>
* src/copy.c (copy internal): Remember directories irrespective
of their link count, because on some file systems like BTRFS,
directories always have a link count of 1.
</content>
</entry>
<entry>
<title>mv: fix data loss with repeated source dir and same destination</title>
<updated>2016-01-13T11:16:37Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-12T12:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d506af44befdbeabb027322652d4842314ba07be'/>
<id>urn:sha1:d506af44befdbeabb027322652d4842314ba07be</id>
<content type='text'>
commit v8.23-31-g90aa291 failed to consider this case,
where the previous rename has failed, thus causing the
following to remove the specified directory:

  mv dir dir dir

* src/copy.c (copy_internal): Assume this rename attempt has
succeeded, as a previous failure will already have been handled,
and we don't want to remove the source directory in this case.
* tests/cp/duplicate-sources.sh: Consolidate this test file to...
* tests/mv/dup-source.sh: ...here.  Add test cases for same
source and dest.
* tests/local.mk: Remove the consolidated test.
* NEWS: Mention the bug fix.

Reported at https://bugzilla.redhat.com/1297464
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2016-01-01T14:10:41Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-01T14:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b16e999f553b682e74e0a56750f649da05130c4f'/>
<id>urn:sha1:b16e999f553b682e74e0a56750f649da05130c4f</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: fix incorrect spellings etc</title>
<updated>2015-12-14T13:36:23Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-10-15T14:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c609cd960d5cc309fe32ab315efe8dde79504d14'/>
<id>urn:sha1:c609cd960d5cc309fe32ab315efe8dde79504d14</id>
<content type='text'>
* NEWS: Use a standard version specification.
* doc/coreutils.texi: Fix incorrect grammar.
* src/df.c: Update a stale comment.
* src/copy.c: Fix incorrect spellings.
* src/factor.c: Likewise.
* src/ls.c: Likewise.
* src/pr.c: Likewise.
* src/relpath.c: Likewise.
* src/shred.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stdbuf.c: Likewise.
* tests/misc/seq-precision.sh: Likewise.
</content>
</entry>
<entry>
<title>copy: fix copying of extents beyond the apparent file size</title>
<updated>2015-11-24T00:49:03Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2015-10-30T22:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=eea6b49210edf69682b2d0606bee17bbccb3765b'/>
<id>urn:sha1:eea6b49210edf69682b2d0606bee17bbccb3765b</id>
<content type='text'>
fallocate can allocate extents beyond EOF via FALLOC_FL_KEEP_SIZE.
Where there is a gap (hole) between the extents, and EOF is within
that gap, the final hole wasn't reproduced, resulting in silent
data corruption in the copied file (size too small).

* src/copy.c (extent_copy): Ensure we don't process extents
beyond the apparent file size, since processing and allocating
those is not currently supported.
* tests/cp/fiemap-extents.sh: Renamed from tests/cp/fiemap-empty.sh
and re-enable parts checking the extents at and beyond EOF.
* tests/local.mk: Reference the renamed test.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/21790
</content>
</entry>
<entry>
<title>all: avoid quoting file names when possible</title>
<updated>2015-11-04T23:30:14Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-11-01T18:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=08e8fd7e38f2dae7c69c54eb22d508b6517e66e5'/>
<id>urn:sha1:08e8fd7e38f2dae7c69c54eb22d508b6517e66e5</id>
<content type='text'>
Quote file names using the "shell-escape" or "shell-escape-always"
methods, which quote as appropriate for most shells,
and better support copy and paste of presented names.
The "always" variant is used when the file name is
embedded in an error message with surrounding spaces.

* cfg.mk (sc_error_shell_quotes): A new syntax check rule
to suggest quotef() where appropriate.
(sc_error_shell_always_quotes): Likewise for quoteaf().
* src/system.h (quotef): A new define to apply shell quoting
when needed.  I.E. when shell character or ':' is present.
(quoteaf): Likewise, but always quote.
* src/*.c: Use quotef() and quoteaf() rather than quote()
where appropriate.
* tests/: Adjust accordingly.
</content>
</entry>
<entry>
<title>copy,dd: simplify and optimize NUL bytes detection</title>
<updated>2015-10-27T17:25:12Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-10-22T13:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9459d9d8112fe7816022665b5016c2014bb625f3'/>
<id>urn:sha1:9459d9d8112fe7816022665b5016c2014bb625f3</id>
<content type='text'>
* src/factor.c: Move LIKELY() definition to...
* src/system.h: ...here.
(is_nul): Reimplement with a version that doesn't
require a sentinel after the buffer, and which calls
down to (the system optimized) memcmp.
Performance analyzed at http://rusty.ozlabs.org/?p=560
* src/dd.c (alloc_obuf): Simplify the is_nul() call by
not needing to write the sentinel.
* src/copy.c (sparse_copy): Likewise.
(copy_reg): Simplify the buffer allocation by avoiding
consideration of the sentinel in the buffer size calculation.
</content>
</entry>
</feed>
