Date: Wed, 19 Nov 2008 11:28:57 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153208 for review Message-ID: <200811191128.mAJBSv6q085248@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/param.h> #include <sys/systm.h> @@ -32,7 +35,6 @@ #include <sys/mount.h> #include <sys/vnode.h> #include <sys/types.h> -#include <sys/acl.h> #include <sys/event.h> #include <sys/extattr.h> @@ -76,6 +78,14 @@ #include <sys/sf_buf.h> #include <sys/sched.h> +#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 <sys/types.h> #include <sys/param.h> #include <sys/time.h> @@ -45,7 +48,6 @@ #include <sys/errno.h> #include <sys/unistd.h> #include <sys/zfs_dir.h> -#include <sys/zfs_acl.h> #include <sys/zfs_ioctl.h> #include <sys/fs/zfs.h> #include <sys/dmu.h> @@ -68,6 +70,14 @@ #include <sys/sf_buf.h> #include <sys/sched.h> +#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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811191128.mAJBSv6q085248>