svn commit: r360055 - in head/sys/fs: nfs nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Fri Apr 17 21:17:53 UTC 2020
Author: rmacklem
Date: Fri Apr 17 21:17:51 2020
New Revision: 360055
URL: https://svnweb.freebsd.org/changeset/base/360055
Log:
Replace all instances of the typedef mbuf_t with "struct mbuf *".
The typedef mbuf_t was used for the Mac OS/X port of the code long ago.
Since this port is no longer used and the use of mbuf_t obscures what
the code does (and is not consistent with style(9)), it is no longer needed.
This patch replaces all instances of mbuf_t with "struct mbuf *", so that
it is no longer used.
This patch should not result in any semantic change.
Modified:
head/sys/fs/nfs/nfs.h
head/sys/fs/nfs/nfs_commonsubs.c
head/sys/fs/nfs/nfs_var.h
head/sys/fs/nfs/nfsrvcache.h
head/sys/fs/nfsserver/nfs_nfsdcache.c
head/sys/fs/nfsserver/nfs_nfsdserv.c
head/sys/fs/nfsserver/nfs_nfsdstate.c
head/sys/fs/nfsserver/nfs_nfsdsubs.c
Modified: head/sys/fs/nfs/nfs.h
==============================================================================
--- head/sys/fs/nfs/nfs.h Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfs/nfs.h Fri Apr 17 21:17:51 2020 (r360055)
@@ -638,10 +638,10 @@ struct nfsgss_mechlist {
* This structure is used by the server for describing each request.
*/
struct nfsrv_descript {
- mbuf_t nd_mrep; /* Request mbuf list */
- mbuf_t nd_md; /* Current dissect mbuf */
- mbuf_t nd_mreq; /* Reply mbuf list */
- mbuf_t nd_mb; /* Current build mbuf */
+ struct mbuf *nd_mrep; /* Request mbuf list */
+ struct mbuf *nd_md; /* Current dissect mbuf */
+ struct mbuf *nd_mreq; /* Reply mbuf list */
+ struct mbuf *nd_mb; /* Current build mbuf */
NFSSOCKADDR_T nd_nam; /* and socket addr */
NFSSOCKADDR_T nd_nam2; /* return socket addr */
caddr_t nd_dpos; /* Current dissect pos */
Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfs/nfs_commonsubs.c Fri Apr 17 21:17:51 2020 (r360055)
@@ -611,7 +611,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *ui
{
char *mbufcp, *uiocp;
int xfer, left, len;
- mbuf_t mp;
+ struct mbuf *mp;
long uiosiz, rem;
int error = 0;
@@ -694,7 +694,7 @@ out:
APPLESTATIC void *
nfsm_dissct(struct nfsrv_descript *nd, int siz, int how)
{
- mbuf_t mp2;
+ struct mbuf *mp2;
int siz2, xfer;
caddr_t p;
int left;
@@ -808,9 +808,9 @@ out:
APPLESTATIC int
nfsm_strtom(struct nfsrv_descript *nd, const char *cp, int siz)
{
- mbuf_t m2;
+ struct mbuf *m2;
int xfer, left;
- mbuf_t m1;
+ struct mbuf *m1;
int rem, bytesize;
u_int32_t *tl;
char *cp2;
@@ -1014,7 +1014,7 @@ APPLESTATIC void
newnfs_trimleading(nd)
struct nfsrv_descript *nd;
{
- mbuf_t m, n;
+ struct mbuf *m, *n;
int offs;
/*
@@ -1059,7 +1059,7 @@ newnfs_trimleading(nd)
APPLESTATIC void
newnfs_trimtrailing(nd, mb, bpos)
struct nfsrv_descript *nd;
- mbuf_t mb;
+ struct mbuf *mb;
caddr_t bpos;
{
@@ -2423,7 +2423,7 @@ nfsrv_mtostr(struct nfsrv_descript *nd, char *str, int
{
char *cp;
int xfer, len;
- mbuf_t mp;
+ struct mbuf *mp;
int rem, error = 0;
mp = nd->nd_md;
@@ -4437,7 +4437,7 @@ nfsrv_refstrbigenough(int siz, u_char **cpp, u_char **
APPLESTATIC void
nfsrvd_rephead(struct nfsrv_descript *nd)
{
- mbuf_t mreq;
+ struct mbuf *mreq;
/*
* If this is a big reply, use a cluster.
Modified: head/sys/fs/nfs/nfs_var.h
==============================================================================
--- head/sys/fs/nfs/nfs_var.h Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfs/nfs_var.h Fri Apr 17 21:17:51 2020 (r360055)
@@ -325,7 +325,7 @@ int nfsm_fhtom(struct nfsrv_descript *, u_int8_t *, in
int nfsm_advance(struct nfsrv_descript *, int, int);
void *nfsm_dissct(struct nfsrv_descript *, int, int);
void newnfs_trimleading(struct nfsrv_descript *);
-void newnfs_trimtrailing(struct nfsrv_descript *, mbuf_t,
+void newnfs_trimtrailing(struct nfsrv_descript *, struct mbuf *,
caddr_t);
void newnfs_copycred(struct nfscred *, struct ucred *);
void newnfs_copyincred(struct ucred *, struct nfscred *);
@@ -390,7 +390,7 @@ int nfsv4_fillattr(struct nfsrv_descript *, struct mou
struct vattr *, fhandle_t *, int, nfsattrbit_t *,
struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t, struct statfs *);
void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *);
-void nfsrv_adj(mbuf_t, int, int);
+void nfsrv_adj(struct mbuf *, int, int);
void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *);
int nfsd_errmap(struct nfsrv_descript *);
void nfsv4_uidtostr(uid_t, u_char **, int *);
@@ -679,12 +679,12 @@ int nfsvno_namei(struct nfsrv_descript *, struct namei
vnode_t, int, struct nfsexstuff *, NFSPROC_T *, vnode_t *);
void nfsvno_setpathbuf(struct nameidata *, char **, u_long **);
void nfsvno_relpathbuf(struct nameidata *);
-int nfsvno_readlink(vnode_t, struct ucred *, NFSPROC_T *, mbuf_t *,
- mbuf_t *, int *);
+int nfsvno_readlink(vnode_t, struct ucred *, NFSPROC_T *, struct mbuf **,
+ struct mbuf **, int *);
int nfsvno_read(vnode_t, off_t, int, struct ucred *, NFSPROC_T *,
- mbuf_t *, mbuf_t *);
-int nfsvno_write(vnode_t, off_t, int, int *, mbuf_t, char *, struct ucred *,
- NFSPROC_T *);
+ struct mbuf **, struct mbuf **);
+int nfsvno_write(vnode_t, off_t, int, int *, struct mbuf *, char *,
+ struct ucred *, NFSPROC_T *);
int nfsvno_createsub(struct nfsrv_descript *, struct nameidata *,
vnode_t *, struct nfsvattr *, int *, int32_t *, NFSDEV_T,
struct nfsexstuff *);
Modified: head/sys/fs/nfs/nfsrvcache.h
==============================================================================
--- head/sys/fs/nfs/nfsrvcache.h Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfs/nfsrvcache.h Fri Apr 17 21:17:51 2020 (r360055)
@@ -53,7 +53,7 @@ struct nfsrvcache {
u_int32_t rc_xid; /* rpc id number */
time_t rc_timestamp; /* Time done */
union {
- mbuf_t repmb; /* Reply mbuf list OR */
+ struct mbuf *repmb; /* Reply mbuf list OR */
int repstat; /* Reply status */
} rc_un;
union {
Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdcache.c Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfsserver/nfs_nfsdcache.c Fri Apr 17 21:17:51 2020 (r360055)
@@ -285,7 +285,7 @@ static void nfsrc_lock(struct nfsrvcache *rp);
static void nfsrc_unlock(struct nfsrvcache *rp);
static void nfsrc_wanted(struct nfsrvcache *rp);
static void nfsrc_freecache(struct nfsrvcache *rp);
-static int nfsrc_getlenandcksum(mbuf_t m1, u_int16_t *cksum);
+static int nfsrc_getlenandcksum(struct mbuf *m1, u_int16_t *cksum);
static void nfsrc_marksametcpconn(u_int64_t);
/*
@@ -460,7 +460,7 @@ nfsrvd_updatecache(struct nfsrv_descript *nd)
{
struct nfsrvcache *rp;
struct nfsrvcache *retrp = NULL;
- mbuf_t m;
+ struct mbuf *m;
struct mtx *mutex;
rp = nd->nd_rp;
@@ -1013,10 +1013,10 @@ nfsrvd_derefcache(struct nfsrvcache *rp)
* NFSRVCACHE_CHECKLEN bytes.
*/
static int
-nfsrc_getlenandcksum(mbuf_t m1, u_int16_t *cksum)
+nfsrc_getlenandcksum(struct mbuf *m1, u_int16_t *cksum)
{
int len = 0, cklen;
- mbuf_t m;
+ struct mbuf *m;
m = m1;
while (m) {
Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 17 21:17:51 2020 (r360055)
@@ -665,7 +665,7 @@ nfsrvd_readlink(struct nfsrv_descript *nd, __unused in
vnode_t vp, __unused struct nfsexstuff *exp)
{
u_int32_t *tl;
- mbuf_t mp = NULL, mpend = NULL;
+ struct mbuf *mp = NULL, *mpend = NULL;
int getret = 1, len;
struct nfsvattr nva;
struct thread *p = curthread;
@@ -710,7 +710,7 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int is
{
u_int32_t *tl;
int error = 0, cnt, getret = 1, gotproxystateid, reqlen, eof = 0;
- mbuf_t m2, m3;
+ struct mbuf *m2, *m3;
struct nfsvattr nva;
off_t off = 0x0;
struct nfsstate st, *stp = &st;
@@ -5532,7 +5532,7 @@ nfsrvd_getxattr(struct nfsrv_descript *nd, __unused in
vnode_t vp, __unused struct nfsexstuff *exp)
{
uint32_t *tl;
- mbuf_t mp = NULL, mpend = NULL;
+ struct mbuf *mp = NULL, *mpend = NULL;
int error, len;
char *name;
struct thread *p = curthread;
Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Apr 17 21:17:51 2020 (r360055)
@@ -4417,7 +4417,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, n
int trunc, fhandle_t *fhp, struct nfsvattr *nap, nfsattrbit_t *attrbitp,
int laytype, NFSPROC_T *p)
{
- mbuf_t m;
+ struct mbuf *m;
u_int32_t *tl;
struct nfsrv_descript *nd;
struct ucred *cred;
Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdsubs.c Fri Apr 17 20:20:03 2020 (r360054)
+++ head/sys/fs/nfsserver/nfs_nfsdsubs.c Fri Apr 17 21:17:51 2020 (r360055)
@@ -1274,9 +1274,9 @@ static short *nfsrv_v4errmap[] = {
* boundary and only trims off the back end
*/
APPLESTATIC void
-nfsrv_adj(mbuf_t mp, int len, int nul)
+nfsrv_adj(struct mbuf *mp, int len, int nul)
{
- mbuf_t m;
+ struct mbuf *m;
int count, i;
char *cp;
@@ -1838,7 +1838,7 @@ nfsrv_parsename(struct nfsrv_descript *nd, char *bufp,
NFSPATHLEN_T *outlenp)
{
char *fromcp, *tocp, val = '\0';
- mbuf_t md;
+ struct mbuf *md;
int i;
int rem, len, error = 0, pubtype = 0, outlen = 0, percent = 0;
char digit;
More information about the svn-src-all
mailing list