<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v7.1</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.1</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-02-18T14:27:10Z</updated>
<entry>
<title>cp: -a now preserves SELinux context, with reduced diagnostics</title>
<updated>2009-02-18T14:27:10Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-02-17T14:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8c243ff965d477a89582a1b329923516a4d64668'/>
<id>urn:sha1:8c243ff965d477a89582a1b329923516a4d64668</id>
<content type='text'>
* copy.c (copy_reg): Reduce SELinux context diagnostics for 'cp -a'.
(copy_internal): Likewise
* copy.h (cp_options): Add boolean reduce_diagnostics.
* cp.c (usage): Say that --archive (-a) behaves like -dR --preserve=all.
(cp_option_init): Initialize added reduce_diagnostics.
(main): Add reduce_diagnostics for the -a option, and preserve SELinux
context, if possible.
* mv.c (cp_options_init): Initialize new cp_options booleans.
* install.c (cp_option_init): Likewise.
* NEWS: Mention those behaviour changes.
* doc/coreutils.texi: Document --preserve=context, document that
diagnostics are not shown for failures of non-mandatory attributes
(just SELinux at the moment).
* tests/cp/cp-a-selinux: Check not only failures, but succesful use
of preserving SELinux context in cp.
</content>
</entry>
<entry>
<title>avoid spurious parentheses/arith-op-related warnings from newer gcc</title>
<updated>2009-02-05T13:53:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-02-05T13:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8ed84c34388b3e475ece2f93ac22e25546503f16'/>
<id>urn:sha1:8ed84c34388b3e475ece2f93ac22e25546503f16</id>
<content type='text'>
* src/copy.c (set_owner): Use &amp;&amp; rather than &amp;.
* src/stty.c (main): Likewise.
* src/wc.c (wc): Likewise.
</content>
</entry>
<entry>
<title>cp/mv: add xattr support</title>
<updated>2009-01-29T12:26:07Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-01-23T11:17:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0889381cbfdbb4895e6b8693d14c0f5c77bc85bc'/>
<id>urn:sha1:0889381cbfdbb4895e6b8693d14c0f5c77bc85bc</id>
<content type='text'>
This patch was originally written by Andreas GrÃ¼nbacher, nowadays
available at
http://www.suse.de/~agruen/coreutils/5.91/coreutils-xattr.diff

* bootstrap.conf: Add gnulib module verror.
* po/POTFILES.in: Add lib/verror.c.
* m4/xattr.m4: Check for libattr availability, new configure option
--disable-xattr.
* m4/prereq.m4: Require gl_FUNC_XATTR.
* src/Makefile.am: Link cp, mv and ginstall with libattr.
* src/copy.h: Add preserve_xattr and require_preserve_xattr to
cp_options.
* src/copy.c (copy_attr_error): New function to handle errors during
xattr copying.
(copy_attr_quote): New function to quote file name in error messages
printed by libattr.
(copy_attr_free): Empty function requested by libattr to free quoted
string.
(copy_attr_by_fd): New fd-oriented function to copy xattr.
(copy_attr_by_name): New name-oriented function to copy xattr.
(copy_reg, copy_internal): Call copy_extended_attributes function.
* src/cp.c (usage): Mention new --preserve=xattr option.
(decode_preserve_arg): Handle new --preserve=xattr option.
* src/mv.c: Always attempt to preserve xattr.
* src/install.c: Never attempt to preserve xattr.
* tests/misc/xattr: New test for xattr support in cp, mv and install.
* tests/Makefile.am: Add the new test to list.
* doc/coreutils.texi: Mention xattr support, new --preserve=xattr
option.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>cp: use far less memory in some cases</title>
<updated>2008-11-20T09:21:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-19T18:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ece0355d52e41a1b079c0c46477a32250278c11'/>
<id>urn:sha1:3ece0355d52e41a1b079c0c46477a32250278c11</id>
<content type='text'>
cp --link was "remembering" many name,dev,inode triples unnecessarily.
cp was doing the same, even without --link, for every directory in the
source hierarchy, while it can do its job with entries merely for the
command-line arguments.  Prompted by a report from Patrick Shoenfeld.
Details &lt;http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15081&gt;.
* src/copy.c (copy_internal): Refrain from remembering
name,dev,inode for most files, when invoked via cp --link.
Record an infloop-avoidance triple for each directory specified
on the command line, not for each directory in the source tree.
Don't record a dir-triple when x-&gt;hard_link is set.
* NEWS (Buf fixes): Mention it.
* tests/cp/link-heap: New file.  Test for cp's lowered memory usage.
* tests/Makefile.am (TESTS): Add link-heap.
</content>
</entry>
<entry>
<title>accommodate gnulib header removals</title>
<updated>2008-10-19T12:15:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-19T11:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31a884dab7510d84a689ef8092132c93e3dcc4ad'/>
<id>urn:sha1:31a884dab7510d84a689ef8092132c93e3dcc4ad</id>
<content type='text'>
* src/copy.c: Don't include "euidaccess.h" or "lchmod.h".
* src/cp.c: Don't include "lchmod.h".
* src/ls.c: Don't include "dirfd.h".
* src/mkdir.c: Don't include "lchmod.h".
* src/pwd.c: Don't include "dirfd.h".
* src/remove.c: Don't include "dirfd.h" or "euidaccess.h".
* src/test.c: Don't include "euidaccess.h".
* gl/modules/getloadavg.diff: Adjust diff for changed context.
* src/uptime.c (uptime): Remove declaration.
</content>
</entry>
<entry>
<title>maint: avoid warnings due to attribute warn_unused_result</title>
<updated>2008-10-17T05:06:54Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-08T08:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bb7fa1e9321e6469c0738c33f5e5bb8ac3d62067'/>
<id>urn:sha1:bb7fa1e9321e6469c0738c33f5e5bb8ac3d62067</id>
<content type='text'>
Now that a (void) cast no longer suffices to ignore warnings from gcc
about uses of functions marked with the warn_unused_result attribute,
we need an alternative.  For the record, here's one of the ignorable
warnings: "copy.c:233: warning: ignoring return value of 'fchown',
declared with attribute warn_unused_result"
* bootstrap.conf (gnulib_modules): Import ignore-value.
* src/copy.c: Include "ignore-value.h".
(set_owner): Use ignore_value in place of "(void)" casts,
to ignore lchown and fchown failures.
* src/cp.c (re_protect): Likewise, to ignore lchown failure.
* src/remove.c (preprocess_dir): Remove unnecessary "(void)" cast.
</content>
</entry>
<entry>
<title>use gnulib's progname module</title>
<updated>2008-06-03T07:15:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-03T06:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=896b672499d6a31a6caf85411bcbdde6edc57668'/>
<id>urn:sha1:896b672499d6a31a6caf85411bcbdde6edc57668</id>
<content type='text'>
* bootstrap.conf (gnulib_modules): Add progname.
* src/*.c (program_name): Remove declaration.
* (main): Call set_program_name rather than setting program_name.
* src/nice.c (main): Cast program_name to "(char *)".
* src/prog-fprintf.c: Include "system.h"
* src/system.h: Include "progname.h".
* maint.mk (sc_program_name): Adjust rule.
Suggestion from Eric Blake.
</content>
</entry>
<entry>
<title>fix cpp indentation policy violations</title>
<updated>2008-06-02T19:47:19Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-02T19:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cc4bdb92f9ef7528658c9e925f2b1156bd693c86'/>
<id>urn:sha1:cc4bdb92f9ef7528658c9e925f2b1156bd693c86</id>
<content type='text'>
* src/copy.c (mkfifo): Indent nested "# define".
* src/timeout.c (ECANCELED): Likewise.
</content>
</entry>
<entry>
<title>"touch E; mkfifo F; cp -fR F E" no longer fails due to existing E</title>
<updated>2008-04-02T16:23:04Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-04-02T13:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c1b6f9458a55cdc1143a1ae3959c577004ff8e3f'/>
<id>urn:sha1:c1b6f9458a55cdc1143a1ae3959c577004ff8e3f</id>
<content type='text'>
* src/copy.c (copy_internal): Revert change of 2005-03-01,
4303f0454592421eea48be87777d32a49e1d5e5b
Prompted by Michael Stone, who pointed me to an old bug report from
Ian Jackson: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/7504
* tests/cp/special-f: New file.  Test for the above.
* tests/cp/Makefile.am (TESTS): Add special-f.
* NEWS: mention this bug fix.
</content>
</entry>
<entry>
<title>copy.c: remove an in-function #ifdef</title>
<updated>2008-04-02T16:22:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-04-02T11:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f3653f0d204a07d80444c261126360901b849e37'/>
<id>urn:sha1:f3653f0d204a07d80444c261126360901b849e37</id>
<content type='text'>
* src/copy.c (rpl_mkfifo) [! HAVE_MKFIFO]: New function.
(mkfifo) [! HAVE_MKFIFO]: Define to rpl_mkfifo.
(copy_internal): Remove #ifdef.

Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
</content>
</entry>
</feed>
