From owner-p4-projects@FreeBSD.ORG Wed Nov 19 11:28:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 10318106567C; Wed, 19 Nov 2008 11:28:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7EF3106564A for ; Wed, 19 Nov 2008 11:28:57 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B2EC28FC19 for ; Wed, 19 Nov 2008 11:28:57 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mAJBSv91085250 for ; Wed, 19 Nov 2008 11:28:57 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mAJBSv6q085248 for perforce@freebsd.org; Wed, 19 Nov 2008 11:28:57 GMT (envelope-from trasz@freebsd.org) Date: Wed, 19 Nov 2008 11:28:57 GMT Message-Id: <200811191128.mAJBSv6q085248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 153208 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2008 11:28:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=153208 Change 153208 by trasz@trasz_victim7 on 2008/11/19 11:28:46 Work around name conflicts to make ZFS compile. Ugly. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/acl_compat.c#3 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#11 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h#2 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/acl_compat.c#3 (text+ko) ==== @@ -25,6 +25,9 @@ * */ +#define acl_t _zfs_acl_t +#define acl_type_t _zfs_acl_type_t + /* XXX: Somewhere in these includes must be bzero(9). */ #include #include @@ -32,7 +35,6 @@ #include #include #include -#include #include #include @@ -76,6 +78,14 @@ #include #include +#undef acl_t +#undef acl_type_t + +/* + * Pull FreeBSD sys/acl.h, not the ZFS one. + */ +#include "../../../../../../../sys/acl.h" + #include "acl_compat.h" struct artwo { ==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#11 (text+ko) ==== @@ -25,6 +25,9 @@ /* Portions Copyright 2007 Jeremy Teo */ +#define acl_t _zfs_acl_t +#define acl_type_t _zfs_acl_type_t + #include #include #include @@ -45,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -68,6 +70,14 @@ #include #include +#undef acl_t +#undef acl_type_t + +/* + * Pull FreeBSD sys/acl.h, not the ZFS one. + */ +#include "../../../../../../../sys/acl.h" + #include "acl_compat.h" /* @@ -4741,7 +4751,7 @@ /* Mostly taken from common/syscall/acl.c. */ vsecattr.vsa_mask = VSA_ACE | VSA_ACECNT; - if (error = zfs_getsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred)) + if (error = zfs_getsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred, NULL)) return (error); aclbsize = vsecattr.vsa_aclcnt * sizeof (ace_t); @@ -4805,7 +4815,7 @@ return (EINVAL); } - if (error = zfs_setsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred)) { + if (error = zfs_setsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred, NULL)) { kmem_free(aaclp, aclbsize); return (error); } ==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h#2 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #define MAX_ACL_ENTRIES (1024) /* max entries of each type */ -typedef struct acl { +typedef struct { int a_type; /* the type of ACL entry */ uid_t a_id; /* the entry in -uid or gid */ o_mode_t a_perm; /* the permission field */