From a66502cde494d3e7f02c8911effbf8f9fc3bc7da Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 11 Jan 2012 01:51:25 +0100 Subject: [PATCH] acl: Align return values of copy_acl and qcopy_acl. * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl, maybe < -1. --- ChangeLog | 6 ++++++ lib/copy-acl.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b0dfef6a..ec288e5c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-10 Bruno Haible + + acl: Align return values of copy_acl and qcopy_acl. + * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl, + maybe < -1. + 2012-01-11 Eric Blake strptime: silence gcc warnings diff --git a/lib/copy-acl.c b/lib/copy-acl.c index 195da98c4..a318396ad 100644 --- a/lib/copy-acl.c +++ b/lib/copy-acl.c @@ -621,7 +621,8 @@ qcopy_acl (const char *src_name, int source_desc, const char *dst_name, If access control lists are not available, fchmod the target file to MODE. Also sets the non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set. - Return 0 if successful, otherwise output a diagnostic and return -1. */ + Return 0 if successful, otherwise output a diagnostic and return a + negative error code. */ int copy_acl (const char *src_name, int source_desc, const char *dst_name, @@ -632,13 +633,14 @@ copy_acl (const char *src_name, int source_desc, const char *dst_name, { case -2: error (0, errno, "%s", quote (src_name)); - return -1; + break; case -1: error (0, errno, _("preserving permissions for %s"), quote (dst_name)); - return -1; + break; default: - return 0; + break; } + return ret; } -- 2.11.0