From ec9ddec04ca1bcd7e7bb514dfc6970627ee47872 Mon Sep 17 00:00:00 2001 From: dfr Date: Wed, 24 Jun 2009 18:42:21 +0000 Subject: Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation and will be removed. --- usr.bin/fstat/fstat.c | 1 - usr.bin/nfsstat/nfsstat.c | 1 - usr.bin/showmount/showmount.c | 36 ++++++++++++++++++------------------ 3 files changed, 18 insertions(+), 20 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 6ed7076..53561e8 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #undef _KERNEL #include -#include #include #include diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index b089125..4af133b 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -53,7 +53,6 @@ static const char rcsid[] = #include #include #include -#include #include #include #include diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index b9ea200..5e67cc1 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -59,7 +59,7 @@ static const char rcsid[] = #include #include #include -#include +#include #include #include @@ -76,29 +76,29 @@ static const char rcsid[] = struct mountlist { struct mountlist *ml_left; struct mountlist *ml_right; - char ml_host[RPCMNT_NAMELEN+1]; - char ml_dirp[RPCMNT_PATHLEN+1]; + char ml_host[MNTNAMLEN+1]; + char ml_dirp[MNTPATHLEN+1]; }; struct grouplist { struct grouplist *gr_next; - char gr_name[RPCMNT_NAMELEN+1]; + char gr_name[MNTNAMLEN+1]; }; struct exportslist { struct exportslist *ex_next; struct grouplist *ex_groups; - char ex_dirp[RPCMNT_PATHLEN+1]; + char ex_dirp[MNTPATHLEN+1]; }; static struct mountlist *mntdump; -static struct exportslist *exports; +static struct exportslist *exportslist; static int type = 0; void print_dump(struct mountlist *); static void usage(void); int xdr_mntdump(XDR *, struct mountlist **); -int xdr_exports(XDR *, struct exportslist **); +int xdr_exportslist(XDR *, struct exportslist **); int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); @@ -158,16 +158,16 @@ main(argc, argv) rpcs = DODUMP; if (rpcs & DODUMP) - if ((estat = tcp_callrpc(host, RPCPROG_MNT, mntvers, - RPCMNT_DUMP, (xdrproc_t)xdr_void, (char *)0, + if ((estat = tcp_callrpc(host, MOUNTPROG, mntvers, + MOUNTPROC_DUMP, (xdrproc_t)xdr_void, (char *)0, (xdrproc_t)xdr_mntdump, (char *)&mntdump)) != 0) { clnt_perrno(estat); errx(1, "can't do mountdump rpc"); } if (rpcs & DOEXPORTS) - if ((estat = tcp_callrpc(host, RPCPROG_MNT, mntvers, - RPCMNT_EXPORT, (xdrproc_t)xdr_void, (char *)0, - (xdrproc_t)xdr_exports, (char *)&exports)) != 0) { + if ((estat = tcp_callrpc(host, MOUNTPROG, mntvers, + MOUNTPROC_EXPORT, (xdrproc_t)xdr_void, (char *)0, + (xdrproc_t)xdr_exportslist, (char *)&exportslist)) != 0) { clnt_perrno(estat); errx(1, "can't do exports rpc"); } @@ -189,7 +189,7 @@ main(argc, argv) } if (rpcs & DOEXPORTS) { printf("Exports list on %s:\n", host); - exp = exports; + exp = exportslist; while (exp) { printf("%-35s", exp->ex_dirp); grp = exp->ex_groups; @@ -265,10 +265,10 @@ xdr_mntdump(xdrsp, mlp) return (0); mp->ml_left = mp->ml_right = (struct mountlist *)0; strp = mp->ml_host; - if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN)) + if (!xdr_string(xdrsp, &strp, MNTNAMLEN)) return (0); strp = mp->ml_dirp; - if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN)) + if (!xdr_string(xdrsp, &strp, MNTPATHLEN)) return (0); /* @@ -327,7 +327,7 @@ next: * Xdr routine to retrieve exports list */ int -xdr_exports(xdrsp, exp) +xdr_exportslist(xdrsp, exp) XDR *xdrsp; struct exportslist **exp; { @@ -345,7 +345,7 @@ xdr_exports(xdrsp, exp) return (0); ep->ex_groups = (struct grouplist *)0; strp = ep->ex_dirp; - if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN)) + if (!xdr_string(xdrsp, &strp, MNTPATHLEN)) return (0); if (!xdr_bool(xdrsp, &grpbool)) return (0); @@ -354,7 +354,7 @@ xdr_exports(xdrsp, exp) if (gp == NULL) return (0); strp = gp->gr_name; - if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN)) + if (!xdr_string(xdrsp, &strp, MNTNAMLEN)) return (0); gp->gr_next = ep->ex_groups; ep->ex_groups = gp; -- cgit v1.1