]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Adjust chmod and chown to be similar if -c or -v are given. In
authorJim Meyering <jim@meyering.net>
Wed, 9 Jun 2004 13:37:52 +0000 (13:37 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 9 Jun 2004 13:37:52 +0000 (13:37 +0000)
commite4ccef8ddc672f9e5ee4963db550f97c1ae2edc8
tree1e366cfe6f14538087e8af43480bb56f23d1df4c
parent7c6999b6f83522d31aeabc6eaed9f923824723d1
Adjust chmod and chown to be similar if -c or -v are given.  In
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior.  Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.

* src/chown-core.c (change_file_owner): Return -1 on error, not
1 sometimes and -1 on others.  Our caller ORs together our results,
and (-1 | 1) == 0 on ones-complement hosts.
With -v report all errors verbosely, not just some.
Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
file_stats wasn't set properly in that case.
src/chown-core.c