PERFORCE change 146530 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Sun Aug 3 15:25:04 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146530
Change 146530 by trasz at trasz_traszkan on 2008/08/03 15:24:04
Change a_mode argument to VOP_ACCESS from int into vaccess_t.
There should be no functional change. It should also be backwards
binary compatible.
Affected files ...
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_vnops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/coda/coda_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/hpfs/hpfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/msdosfs/msdosfs_vnops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/ntfs/ntfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/nullfs/null_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/nwfs/nwfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/smbfs/smbfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/tmpfs/tmpfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/udf/udf_vnops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/ext2fs/ext2_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/reiserfs/reiserfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#13 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_posix1e.c#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_mqueue.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_subr.c#7 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vnode_if.src#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/nfsclient/nfs_vnops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/vnode.h#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#7 edit
Differences ...
==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#2 (text+ko) ====
@@ -235,12 +235,12 @@
zfsctl_common_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
- int mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
if (mode & VWRITE)
return (EACCES);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#5 (text+ko) ====
@@ -3205,7 +3205,7 @@
zfs_freebsd_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_vnops.c#3 (text+ko) ====
@@ -126,14 +126,14 @@
cd9660_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct iso_node *ip = VTOI(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
if (vp->v_type == VCHR || vp->v_type == VBLK)
return (EOPNOTSUPP);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/coda/coda_vnops.c#2 (text+ko) ====
@@ -609,7 +609,7 @@
/* true args */
struct vnode *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
- int mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
struct ucred *cred = ap->a_cred;
struct thread *td = ap->a_td;
/* locals */
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/hpfs/hpfs_vnops.c#2 (text+ko) ====
@@ -685,14 +685,14 @@
hpfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct hpfsnode *hp = VTOHP(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
dprintf(("hpfs_access(0x%x):\n", hp->h_no));
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/msdosfs/msdosfs_vnops.c#3 (text+ko) ====
@@ -249,7 +249,7 @@
msdosfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
@@ -257,7 +257,8 @@
struct vnode *vp = ap->a_vp;
struct denode *dep = VTODE(ap->a_vp);
struct msdosfsmount *pmp = dep->de_pmp;
- mode_t file_mode, mode = ap->a_mode;
+ mode_t file_mode;
+ vaccess_t mode = ap->a_mode;
file_mode = (S_IXUSR|S_IXGRP|S_IXOTH) | (S_IRUSR|S_IRGRP|S_IROTH) |
((dep->de_Attributes & ATTR_READONLY) ? 0 : (S_IWUSR|S_IWGRP|S_IWOTH));
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/ntfs/ntfs_vnops.c#2 (text+ko) ====
@@ -386,14 +386,14 @@
ntfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct ntnode *ip = VTONT(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
#ifdef QUOTA
int error;
#endif
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/nullfs/null_vnops.c#2 (text+ko) ====
@@ -451,7 +451,7 @@
null_access(struct vop_access_args *ap)
{
struct vnode *vp = ap->a_vp;
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
/*
* Disallow write attempts on read-only layers;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/nwfs/nwfs_vnops.c#2 (text+ko) ====
@@ -121,7 +121,7 @@
nwfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *td;
} */ *ap;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/smbfs/smbfs_vnops.c#2 (text+ko) ====
@@ -123,13 +123,13 @@
smbfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
mode_t mpmode;
struct smbmount *smp = VTOSMBFS(vp);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/tmpfs/tmpfs_vnops.c#2 (text+ko) ====
@@ -289,7 +289,7 @@
tmpfs_access(struct vop_access_args *v)
{
struct vnode *vp = v->a_vp;
- int mode = v->a_mode;
+ vaccess_t mode = v->a_mode;
struct ucred *cred = v->a_cred;
int error;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/udf/udf_vnops.c#3 (text+ko) ====
@@ -139,7 +139,8 @@
{
struct vnode *vp;
struct udf_node *node;
- mode_t a_mode, mode;
+ vaccess_t a_mode;
+ mode_t mode;
vp = a->a_vp;
node = VTON(vp);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vnops.c#2 (text+ko) ====
@@ -645,7 +645,7 @@
struct vnode *lvp;
struct thread *td;
struct vattr va;
- int mode;
+ vaccess_t mode;
int error;
UNIONFS_INTERNAL_DEBUG("unionfs_access: enter\n");
==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/ext2fs/ext2_vnops.c#2 (text+ko) ====
@@ -289,14 +289,14 @@
ext2_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
int error;
if (vp->v_type == VBLK || vp->v_type == VCHR)
==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/reiserfs/reiserfs_vnops.c#2 (text+ko) ====
@@ -57,7 +57,7 @@
int error;
struct vnode *vp = ap->a_vp;
struct reiserfs_node *ip = VTOI(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
/*
* Disallow write attempts on read-only file systems; unless the file
==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c#2 (text+ko) ====
@@ -180,7 +180,7 @@
_xfs_access(
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap)
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#13 (text+ko) ====
@@ -52,7 +52,7 @@
#ifdef _KERNEL
static int
-_access_mask_from_mode(mode_t mode)
+_access_mask_from_mode(vaccess_t mode)
{
int access_mask = 0;
@@ -149,10 +149,10 @@
int
vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid,
- struct acl *aclp, mode_t acc_mode, int needed_bits, struct ucred *cred,
+ struct acl *aclp, vaccess_t acc_mode, int needed_bits, struct ucred *cred,
int *privused)
{
- mode_t priv_granted = 0;
+ vaccess_t priv_granted = 0;
int denied, explicitly_denied, is_directory, must_be_owner = 0;
if (privused != NULL)
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_posix1e.c#6 (text+ko) ====
@@ -53,12 +53,12 @@
*/
int
vaccess_acl_posix1e(enum vtype type, uid_t file_uid, gid_t file_gid,
- struct acl *acl, mode_t acc_mode, struct ucred *cred, int *privused)
+ struct acl *acl, vaccess_t acc_mode, struct ucred *cred, int *privused)
{
struct acl_entry *acl_other, *acl_mask;
- mode_t dac_granted;
- mode_t priv_granted;
- mode_t acl_mask_granted;
+ vaccess_t dac_granted;
+ vaccess_t priv_granted;
+ vaccess_t acl_mask_granted;
int group_matched, i;
/*
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_mqueue.c#2 (text+ko) ====
@@ -1084,7 +1084,7 @@
struct vop_access_args {
struct vop_generic_args a_gen;
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
};
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_subr.c#7 (text+ko) ====
@@ -3443,10 +3443,10 @@
*/
int
vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid,
- mode_t acc_mode, struct ucred *cred, int *privused)
+ vaccess_t acc_mode, struct ucred *cred, int *privused)
{
- mode_t dac_granted;
- mode_t priv_granted;
+ vaccess_t dac_granted;
+ vaccess_t priv_granted;
/*
* Look for a normal, non-privileged way to access the file/directory
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vnode_if.src#5 (text+ko) ====
@@ -147,7 +147,7 @@
vop_access {
IN struct vnode *vp;
- IN int mode;
+ IN vaccess_t mode;
IN struct ucred *cred;
IN struct thread *td;
};
@@ -157,7 +157,7 @@
vop_granular {
IN struct vnode *vp;
- IN int mode;
+ IN vaccess_t mode;
IN int access_mask;
IN struct ucred *cred;
IN struct thread *td;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/nfsclient/nfs_vnops.c#3 (text+ko) ====
@@ -3177,7 +3177,7 @@
struct vattr *vap;
struct ucred *cred = ap->a_cred;
struct vnode *vp = ap->a_vp;
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
struct vattr vattr;
int error;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/sys/vnode.h#6 (text+ko) ====
@@ -307,6 +307,8 @@
#define IO_SEQMAX 0x7F /* seq heuristic max value */
#define IO_SEQSHIFT 16 /* seq heuristic in upper 16 bits */
+#define vaccess_t int
+
/*
* Modes. Some values same as Ixxx entries from inode.h for now.
*/
@@ -587,13 +589,13 @@
char **retbuf, char **freebuf);
int vn_commname(struct vnode *vn, char *buf, u_int buflen);
int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid,
- gid_t file_gid, mode_t acc_mode, struct ucred *cred,
+ gid_t file_gid, vaccess_t acc_mode, struct ucred *cred,
int *privused);
int vaccess_acl_posix1e(enum vtype type, uid_t file_uid,
- gid_t file_gid, struct acl *acl, mode_t acc_mode,
+ gid_t file_gid, struct acl *acl, vaccess_t acc_mode,
struct ucred *cred, int *privused);
int vaccess_acl_nfs4(enum vtype type, uid_t file_uid,
- gid_t file_gid, struct acl *acl, mode_t acc_mode,
+ gid_t file_gid, struct acl *acl, vaccess_t acc_mode,
int access_mask, struct ucred *cred, int *privused);
void vattr_null(struct vattr *vap);
int vcount(struct vnode *vp);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#7 (text+ko) ====
@@ -302,15 +302,15 @@
ufs_granular(ap)
struct vop_granular_args /* {
struct vnode *a_vp;
- int a_mode;
- int a_access_mask;
+ vaccess_t a_mode;
+ int a_access_mask;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
- mode_t mode = ap->a_mode;
+ vaccess_t mode = ap->a_mode;
int error;
#ifdef UFS_ACL
struct acl *acl;
@@ -388,7 +388,7 @@
ufs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ vaccess_t a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
More information about the p4-projects
mailing list