Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 2008 18:10:29 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 143927 for review
Message-ID:  <200806221810.m5MIATdn087595@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143927

Change 143927 by trasz@trasz_traszkan on 2008/06/22 18:10:08

	Little diff reduction, there should be no functional changes:
	make acl_set_fd(3) a wrapper around acl_set_fd_np(3), do the same
	with acl_get_fd(3) and acl_get_fd_np(3).

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/bin/setfacl/setfacl.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#2 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/bin/setfacl/setfacl.c#2 (text+ko) ====


==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#2 (text+ko) ====

@@ -91,20 +91,7 @@
 acl_t
 acl_get_fd(int fd)
 {
-	acl_t	aclp;
-	int	error;
-
-	aclp = acl_init(ACL_MAX_ENTRIES);
-	if (aclp == NULL)
-		return (NULL);
-
-	error = ___acl_get_fd(fd, ACL_TYPE_ACCESS, &aclp->ats_acl);
-	if (error) {
-		acl_free(aclp);
-		return (NULL);
-	}
-
-	return (aclp);
+	return (acl_get_fd_np(fd, ACL_TYPE_ACCESS));
 }
 
 acl_t

==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#2 (text+ko) ====

@@ -96,17 +96,7 @@
 int
 acl_set_fd(int fd, acl_t acl)
 {
-	int	error;
-
-	error = _posix1e_acl_sort(acl);
-	if (error) {
-		errno = error;
-		return(-1);
-	}
-
-	acl->ats_cur_entry = 0;
-
-	return (___acl_set_fd(fd, ACL_TYPE_ACCESS, &acl->ats_acl));
+	return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS));
 }
 
 int



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