Back out MFC of "eradicate caddr_t".
Turn's out Kris' suspisions were right - from a suttle code compatability point of view. Robert Watson found that ARLA code had something like this: typedef int (*foo_t)(caddr_t); ... foo_t fred; The compile gets all snarky when it finds int fred(void *) { .. }.
This commit is contained in:
parent
86c1681769
commit
1adb54c02d
@ -265,7 +265,7 @@ nullfs_quotactl(mp, cmd, uid, arg, td)
|
||||
struct mount *mp;
|
||||
int cmd;
|
||||
uid_t uid;
|
||||
void *arg;
|
||||
caddr_t arg;
|
||||
struct thread *td;
|
||||
{
|
||||
return VFS_QUOTACTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, uid, arg, td);
|
||||
|
@ -135,7 +135,7 @@ static int nwfs_cmount(struct mntarg *ma, void *data, int flags,
|
||||
struct nwfs_args args; /* will hold data from mount request */
|
||||
int error;
|
||||
|
||||
error = copyin(data, &args, sizeof(struct nwfs_args));
|
||||
error = copyin(data, (caddr_t)&args, sizeof(struct nwfs_args));
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
@ -375,7 +375,7 @@ nwfs_quotactl(mp, cmd, uid, arg, td)
|
||||
struct mount *mp;
|
||||
int cmd;
|
||||
uid_t uid;
|
||||
void *arg;
|
||||
caddr_t arg;
|
||||
struct thread *td;
|
||||
{
|
||||
NCPVODEBUG("return EOPNOTSUPP\n");
|
||||
|
@ -108,7 +108,7 @@ smbfs_cmount(struct mntarg *ma, void * data, int flags, struct thread *td)
|
||||
struct smbfs_args args;
|
||||
int error;
|
||||
|
||||
error = copyin(data, &args, sizeof(struct smbfs_args));
|
||||
error = copyin(data, (caddr_t)&args, sizeof(struct smbfs_args));
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
@ -356,7 +356,7 @@ smbfs_quotactl(mp, cmd, uid, arg, td)
|
||||
struct mount *mp;
|
||||
int cmd;
|
||||
uid_t uid;
|
||||
void *arg;
|
||||
caddr_t arg;
|
||||
struct thread *td;
|
||||
{
|
||||
SMBVDEBUG("return EOPNOTSUPP\n");
|
||||
|
@ -542,7 +542,7 @@ vfs_stdquotactl (mp, cmds, uid, arg, td)
|
||||
struct mount *mp;
|
||||
int cmds;
|
||||
uid_t uid;
|
||||
void *arg;
|
||||
caddr_t arg;
|
||||
struct thread *td;
|
||||
{
|
||||
|
||||
|
@ -328,7 +328,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred,
|
||||
aresid, td)
|
||||
enum uio_rw rw;
|
||||
struct vnode *vp;
|
||||
void *base;
|
||||
caddr_t base;
|
||||
int len;
|
||||
off_t offset;
|
||||
enum uio_seg segflg;
|
||||
@ -421,7 +421,7 @@ vn_rdwr_inchunks(rw, vp, base, len, offset, segflg, ioflg, active_cred,
|
||||
file_cred, aresid, td)
|
||||
enum uio_rw rw;
|
||||
struct vnode *vp;
|
||||
void *base;
|
||||
caddr_t base;
|
||||
size_t len;
|
||||
off_t offset;
|
||||
enum uio_seg segflg;
|
||||
@ -458,7 +458,7 @@ vn_rdwr_inchunks(rw, vp, base, len, offset, segflg, ioflg, active_cred,
|
||||
if (error)
|
||||
break;
|
||||
offset += chunk;
|
||||
base = (char *)base + chunk;
|
||||
base += chunk;
|
||||
uio_yield();
|
||||
} while (len);
|
||||
if (aresid)
|
||||
@ -859,7 +859,7 @@ vn_closefile(fp, td)
|
||||
lf.l_start = 0;
|
||||
lf.l_len = 0;
|
||||
lf.l_type = F_UNLCK;
|
||||
(void) VOP_ADVLOCK(vp, fp, F_UNLCK, &lf, F_FLOCK);
|
||||
(void) VOP_ADVLOCK(vp, (caddr_t)fp, F_UNLCK, &lf, F_FLOCK);
|
||||
}
|
||||
|
||||
fp->f_ops = &badfileops;
|
||||
|
@ -509,7 +509,7 @@ typedef int vfs_unmount_t(struct mount *mp, int mntflags, struct thread *td);
|
||||
typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp,
|
||||
struct thread *td);
|
||||
typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid,
|
||||
void *arg, struct thread *td);
|
||||
caddr_t arg, struct thread *td);
|
||||
typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp,
|
||||
struct thread *td);
|
||||
typedef int vfs_sync_t(struct mount *mp, int waitfor, struct thread *td);
|
||||
|
@ -618,11 +618,11 @@ int vn_open(struct nameidata *ndp, int *flagp, int cmode, int fdidx);
|
||||
int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode,
|
||||
struct ucred *cred, int fdidx);
|
||||
int vn_pollrecord(struct vnode *vp, struct thread *p, int events);
|
||||
int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base,
|
||||
int vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base,
|
||||
int len, off_t offset, enum uio_seg segflg, int ioflg,
|
||||
struct ucred *active_cred, struct ucred *file_cred, int *aresid,
|
||||
struct thread *td);
|
||||
int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
|
||||
int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, caddr_t base,
|
||||
size_t len, off_t offset, enum uio_seg segflg, int ioflg,
|
||||
struct ucred *active_cred, struct ucred *file_cred, size_t *aresid,
|
||||
struct thread *td);
|
||||
|
@ -182,12 +182,12 @@ void dqinit(void);
|
||||
void dqrele(struct vnode *, struct dquot *);
|
||||
void dquninit(void);
|
||||
int getinoquota(struct inode *);
|
||||
int getquota(struct thread *, struct mount *, u_long, int, void *);
|
||||
int getquota(struct thread *, struct mount *, u_long, int, caddr_t);
|
||||
int qsync(struct mount *mp);
|
||||
int quotaoff(struct thread *td, struct mount *, int);
|
||||
int quotaon(struct thread *td, struct mount *, int, void *);
|
||||
int setquota(struct thread *, struct mount *, u_long, int, void *);
|
||||
int setuse(struct thread *, struct mount *, u_long, int, void *);
|
||||
int quotaon(struct thread *td, struct mount *, int, caddr_t);
|
||||
int setquota(struct thread *, struct mount *, u_long, int, caddr_t);
|
||||
int setuse(struct thread *, struct mount *, u_long, int, caddr_t);
|
||||
vfs_quotactl_t ufs_quotactl;
|
||||
|
||||
#else /* !_KERNEL */
|
||||
|
@ -441,7 +441,7 @@ quotaon(td, mp, type, fname)
|
||||
struct thread *td;
|
||||
struct mount *mp;
|
||||
int type;
|
||||
void *fname;
|
||||
caddr_t fname;
|
||||
{
|
||||
struct ufsmount *ump;
|
||||
struct vnode *vp, **vpp;
|
||||
@ -610,7 +610,7 @@ getquota(td, mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
void *addr;
|
||||
caddr_t addr;
|
||||
{
|
||||
struct dquot *dq;
|
||||
int error;
|
||||
@ -639,7 +639,7 @@ getquota(td, mp, id, type, addr)
|
||||
error = dqget(NULLVP, id, VFSTOUFS(mp), type, &dq);
|
||||
if (error)
|
||||
return (error);
|
||||
error = copyout(&dq->dq_dqb, addr, sizeof (struct dqblk));
|
||||
error = copyout((caddr_t)&dq->dq_dqb, addr, sizeof (struct dqblk));
|
||||
dqrele(NULLVP, dq);
|
||||
return (error);
|
||||
}
|
||||
@ -653,7 +653,7 @@ setquota(td, mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
void *addr;
|
||||
caddr_t addr;
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct dquot *ndq;
|
||||
@ -665,7 +665,7 @@ setquota(td, mp, id, type, addr)
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
error = copyin(addr, &newlim, sizeof (struct dqblk));
|
||||
error = copyin(addr, (caddr_t)&newlim, sizeof (struct dqblk));
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
@ -722,7 +722,7 @@ setuse(td, mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
void *addr;
|
||||
caddr_t addr;
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct ufsmount *ump;
|
||||
@ -734,7 +734,7 @@ setuse(td, mp, id, type, addr)
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
error = copyin(addr, &usage, sizeof (struct dqblk));
|
||||
error = copyin(addr, (caddr_t)&usage, sizeof (struct dqblk));
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
@ -950,7 +950,7 @@ dqget(vp, id, ump, type, dqp)
|
||||
dq->dq_type = type;
|
||||
auio.uio_iov = &aiov;
|
||||
auio.uio_iovcnt = 1;
|
||||
aiov.iov_base = &dq->dq_dqb;
|
||||
aiov.iov_base = (caddr_t)&dq->dq_dqb;
|
||||
aiov.iov_len = sizeof (struct dqblk);
|
||||
auio.uio_resid = sizeof (struct dqblk);
|
||||
auio.uio_offset = (off_t)id * sizeof (struct dqblk);
|
||||
@ -959,7 +959,7 @@ dqget(vp, id, ump, type, dqp)
|
||||
auio.uio_td = (struct thread *)0;
|
||||
error = VOP_READ(dqvp, &auio, 0, ump->um_cred[type]);
|
||||
if (auio.uio_resid == sizeof(struct dqblk) && error == 0)
|
||||
bzero(&dq->dq_dqb, sizeof(struct dqblk));
|
||||
bzero((caddr_t)&dq->dq_dqb, sizeof(struct dqblk));
|
||||
if (vp != dqvp)
|
||||
VOP_UNLOCK(dqvp, 0, td);
|
||||
if (dq->dq_flags & DQ_WANT)
|
||||
@ -1065,7 +1065,7 @@ dqsync(vp, dq)
|
||||
dq->dq_flags |= DQ_LOCK;
|
||||
auio.uio_iov = &aiov;
|
||||
auio.uio_iovcnt = 1;
|
||||
aiov.iov_base = &dq->dq_dqb;
|
||||
aiov.iov_base = (caddr_t)&dq->dq_dqb;
|
||||
aiov.iov_len = sizeof (struct dqblk);
|
||||
auio.uio_resid = sizeof (struct dqblk);
|
||||
auio.uio_offset = (off_t)dq->dq_id * sizeof (struct dqblk);
|
||||
|
@ -90,7 +90,7 @@ ufs_quotactl(mp, cmds, id, arg, td)
|
||||
struct mount *mp;
|
||||
int cmds;
|
||||
uid_t id;
|
||||
void *arg;
|
||||
caddr_t arg;
|
||||
struct thread *td;
|
||||
{
|
||||
#ifndef QUOTA
|
||||
|
Loading…
x
Reference in New Issue
Block a user