Remove Mac OS/X macros that did nothing for FreeBSD.
The macros CAST_USER_ADDR_T() and CAST_DOWN() were used for the Mac OS/X port. The first of these macros was a no-op for FreeBSD and the second is no longer used. This patch gets rid of them. It also deletes the "mbuf_t" typedef which is no longer used in the FreeBSD code from nfskpiport.h This patch should not change semantics.
This commit is contained in:
parent
7b2f84db82
commit
e4a458bb1b
@ -652,7 +652,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *uiop, int siz)
|
||||
if (uiop->uio_segflg == UIO_SYSSPACE)
|
||||
NFSBCOPY(mbufcp, uiocp, xfer);
|
||||
else
|
||||
copyout(mbufcp, CAST_USER_ADDR_T(uiocp), xfer);
|
||||
copyout(mbufcp, uiocp, xfer);
|
||||
left -= xfer;
|
||||
len -= xfer;
|
||||
mbufcp += xfer;
|
||||
@ -3759,8 +3759,7 @@ nfssvc_idname(struct nfsd_idargs *nidp)
|
||||
}
|
||||
if (nidp->nid_flag & NFSID_INITIALIZE) {
|
||||
cp = malloc(nidp->nid_namelen + 1, M_NFSSTRING, M_WAITOK);
|
||||
error = copyin(CAST_USER_ADDR_T(nidp->nid_name), cp,
|
||||
nidp->nid_namelen);
|
||||
error = copyin(nidp->nid_name, cp, nidp->nid_namelen);
|
||||
if (error != 0) {
|
||||
free(cp, M_NFSSTRING);
|
||||
goto out;
|
||||
@ -3856,13 +3855,13 @@ nfssvc_idname(struct nfsd_idargs *nidp)
|
||||
*/
|
||||
newusrp = malloc(sizeof(struct nfsusrgrp) + nidp->nid_namelen,
|
||||
M_NFSUSERGROUP, M_WAITOK | M_ZERO);
|
||||
error = copyin(CAST_USER_ADDR_T(nidp->nid_name), newusrp->lug_name,
|
||||
error = copyin(nidp->nid_name, newusrp->lug_name,
|
||||
nidp->nid_namelen);
|
||||
if (error == 0 && nidp->nid_ngroup > 0 &&
|
||||
(nidp->nid_flag & NFSID_ADDUID) != 0) {
|
||||
grps = malloc(sizeof(gid_t) * nidp->nid_ngroup, M_TEMP,
|
||||
M_WAITOK);
|
||||
error = copyin(CAST_USER_ADDR_T(nidp->nid_grps), grps,
|
||||
error = copyin(nidp->nid_grps, grps,
|
||||
sizeof(gid_t) * nidp->nid_ngroup);
|
||||
if (error == 0) {
|
||||
/*
|
||||
|
@ -43,13 +43,9 @@ typedef struct vnode * vnode_t;
|
||||
#define vnode_mount(v) ((v)->v_mount)
|
||||
#define vnode_vtype(v) ((v)->v_type)
|
||||
|
||||
typedef struct mbuf * mbuf_t;
|
||||
|
||||
/*
|
||||
* This stuff is needed by Darwin for handling the uio structure.
|
||||
*/
|
||||
#define CAST_USER_ADDR_T(a) (a)
|
||||
#define CAST_DOWN(c, a) ((c) (a))
|
||||
#define uio_uio_resid(p) ((p)->uio_resid)
|
||||
#define uio_uio_resid_add(p, v) ((p)->uio_resid += (v))
|
||||
#define uio_uio_resid_set(p, v) ((p)->uio_resid = (v))
|
||||
|
@ -105,8 +105,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz)
|
||||
NFSBCOPY(uiocp, mtod(mp, caddr_t) + mp->m_len,
|
||||
xfer);
|
||||
else
|
||||
copyin(CAST_USER_ADDR_T(uiocp), mtod(mp, caddr_t)
|
||||
+ mp->m_len, xfer);
|
||||
copyin(uiocp, mtod(mp, caddr_t) + mp->m_len, xfer);
|
||||
mp->m_len += xfer;
|
||||
left -= xfer;
|
||||
uiocp += xfer;
|
||||
|
@ -3712,8 +3712,7 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
|
||||
len = sizeof (struct nfsd_dumpclients) * dumplist.ndl_size;
|
||||
dumpclients = malloc(len, M_TEMP, M_WAITOK | M_ZERO);
|
||||
nfsrv_dumpclients(dumpclients, dumplist.ndl_size);
|
||||
error = copyout(dumpclients,
|
||||
CAST_USER_ADDR_T(dumplist.ndl_list), len);
|
||||
error = copyout(dumpclients, dumplist.ndl_list, len);
|
||||
free(dumpclients, M_TEMP);
|
||||
}
|
||||
} else if (uap->flag & NFSSVC_DUMPLOCKS) {
|
||||
@ -3732,8 +3731,8 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
|
||||
nfsrv_dumplocks(nd.ni_vp, dumplocks,
|
||||
dumplocklist.ndllck_size, p);
|
||||
vput(nd.ni_vp);
|
||||
error = copyout(dumplocks,
|
||||
CAST_USER_ADDR_T(dumplocklist.ndllck_list), len);
|
||||
error = copyout(dumplocks, dumplocklist.ndllck_list,
|
||||
len);
|
||||
free(dumplocks, M_TEMP);
|
||||
}
|
||||
} else if (uap->flag & NFSSVC_BACKUPSTABLE) {
|
||||
|
Loading…
Reference in New Issue
Block a user