diff options
Diffstat (limited to 'usr.bin/showmount')
-rw-r--r-- | usr.bin/showmount/showmount.c | 36 |
1 files changed, 18 insertions, 18 deletions
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 <rpc/rpc.h> #include <rpc/pmap_clnt.h> #include <rpc/pmap_prot.h> -#include <nfs/rpcv2.h> +#include <rpcsvc/mount.h> #include <stdio.h> #include <stdlib.h> @@ -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; |