From owner-svn-src-stable@FreeBSD.ORG Tue Feb 1 16:11:31 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA2611065670; Tue, 1 Feb 2011 16:11:31 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D87178FC14; Tue, 1 Feb 2011 16:11:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p11GBVbX077656; Tue, 1 Feb 2011 16:11:31 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p11GBVIL077654; Tue, 1 Feb 2011 16:11:31 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201102011611.p11GBVIL077654@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 1 Feb 2011 16:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218172 - stable/8/bin/setfacl X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 16:11:32 -0000 Author: jh Date: Tue Feb 1 16:11:31 2011 New Revision: 218172 URL: http://svn.freebsd.org/changeset/base/218172 Log: MFC r216922: Increase carried_error if we skip a file due to an error. This ensures that setfacl(1) exits with proper exit status on failure. PR: bin/149780 Modified: stable/8/bin/setfacl/setfacl.c Directory Properties: stable/8/bin/setfacl/ (props changed) Modified: stable/8/bin/setfacl/setfacl.c ============================================================================== --- stable/8/bin/setfacl/setfacl.c Tue Feb 1 15:48:27 2011 (r218171) +++ stable/8/bin/setfacl/setfacl.c Tue Feb 1 16:11:31 2011 (r218172) @@ -201,12 +201,14 @@ main(int argc, char *argv[]) if (stat(file->filename, &sb) == -1) { warn("%s: stat() failed", file->filename); + carried_error++; continue; } if (acl_type == ACL_TYPE_DEFAULT && S_ISDIR(sb.st_mode) == 0) { warnx("%s: default ACL may only be set on a directory", file->filename); + carried_error++; continue; } @@ -218,6 +220,7 @@ main(int argc, char *argv[]) if (acl_type == ACL_TYPE_DEFAULT) { warnx("%s: there are no default entries " "in NFSv4 ACLs", file->filename); + carried_error++; continue; } acl_type = ACL_TYPE_NFS4; @@ -240,6 +243,7 @@ main(int argc, char *argv[]) else warn("%s: acl_get_file() failed", file->filename); + carried_error++; continue; }