diff options
author | trasz <trasz@FreeBSD.org> | 2008-11-03 16:36:23 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-11-03 16:36:23 +0000 |
commit | 3480dc7ca9b626ccd2fd549b4c2983c6740d86ed (patch) | |
tree | 8248966bb01744043e75d660e534f07bdcf2ae60 /sys/fs/coda | |
parent | cb4c4bdda2ec3a001d9a89c64e5a3828f1598551 (diff) | |
download | FreeBSD-src-3480dc7ca9b626ccd2fd549b4c2983c6740d86ed.zip FreeBSD-src-3480dc7ca9b626ccd2fd549b4c2983c6740d86ed.tar.gz |
Fix few missed accmode changes in coda.
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/fs/coda')
-rw-r--r-- | sys/fs/coda/cnode.h | 2 | ||||
-rw-r--r-- | sys/fs/coda/coda_subr.c | 4 | ||||
-rw-r--r-- | sys/fs/coda/coda_venus.c | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/sys/fs/coda/cnode.h b/sys/fs/coda/cnode.h index bd508e2..8506404 100644 --- a/sys/fs/coda/cnode.h +++ b/sys/fs/coda/cnode.h @@ -102,7 +102,7 @@ struct cnode { char *c_symlink; /* pointer to symbolic link */ u_short c_symlen; /* length of symbolic link */ uid_t c_cached_uid; /* cached uid */ - mode_t c_cached_mode; /* cached access mode */ + accmode_t c_cached_mode; /* cached access mode */ struct cnode *c_next; /* links if on FreeBSD machine */ }; #define VTOC(vp) ((struct cnode *)(vp)->v_data) diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c index e522bfe..e24950b 100644 --- a/sys/fs/coda/coda_subr.c +++ b/sys/fs/coda/coda_subr.c @@ -195,7 +195,7 @@ coda_acccache_purge(struct mount *mnt) CODADEBUG(CODA_FLUSH, myprintf(("acccache " "purge fid %s uid %d mode 0x%x\n", coda_f2s(&cp->c_fid), cp->c_cached_uid, - cp->c_cached_mode));); + (int)cp->c_cached_mode));); cp->c_flags &= ~C_ACCCACHE; } } @@ -223,7 +223,7 @@ coda_acccache_purgeuser(struct mount *mnt, uid_t uid) CODADEBUG(CODA_PURGEUSER, myprintf(( "acccache purgeuser fid %s uid %d mode " "0x%x\n", coda_f2s(&cp->c_fid), - cp->c_cached_uid, cp->c_cached_mode));); + cp->c_cached_uid, (int)cp->c_cached_mode));); cp->c_flags &= ~C_ACCCACHE; } } diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index 1586f36..b5e3b96 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -347,7 +347,7 @@ venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred) } int -venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred, +venus_access(void *mdp, CodaFid *fid, accmode_t accmode, struct ucred *cred, struct proc *p) { DECL_NO_OUT(coda_access); /* sets Isize & Osize */ @@ -362,8 +362,10 @@ venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred, /* * NOTE: FreeBSD and Venus internals use the "data" in the low 3 * bits. Hence, the conversion. + * + * XXX: We cast accmode_t variable into an int. */ - inp->flags = mode>>6; + inp->flags = (int)accmode>>6; error = coda_call(mdp, Isize, &Osize, (char *)inp); |