Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2018 19:01:52 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339781 - head/bin/setfacl
Message-ID:  <201810261901.w9QJ1qAK025628@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Fri Oct 26 19:01:52 2018
New Revision: 339781
URL: https://svnweb.freebsd.org/changeset/base/339781

Log:
  Don't print pathconf() errors if the target file doesn't exist.
  
  The subsequent acl_get_file(3) call will simply echo the same error.
  
  PR:		229930
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/bin/setfacl/setfacl.c

Modified: head/bin/setfacl/setfacl.c
==============================================================================
--- head/bin/setfacl/setfacl.c	Fri Oct 26 18:56:58 2018	(r339780)
+++ head/bin/setfacl/setfacl.c	Fri Oct 26 19:01:52 2018	(r339781)
@@ -174,8 +174,8 @@ handle_file(FTS *ftsp, FTSENT *file)
 	} else if (ret == 0) {
 		if (acl_type == ACL_TYPE_NFS4)
 			acl_type = ACL_TYPE_ACCESS;
-	} else if (ret < 0 && errno != EINVAL) {
-		warn("%s: pathconf(..., _PC_ACL_NFS4) failed",
+	} else if (ret < 0 && errno != EINVAL && errno != ENOENT) {
+		warn("%s: pathconf(_PC_ACL_NFS4) failed",
 		    file->fts_path);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810261901.w9QJ1qAK025628>