diff options
Diffstat (limited to 'usr.bin/showmount')
-rw-r--r-- | usr.bin/showmount/showmount.8 | 9 | ||||
-rw-r--r-- | usr.bin/showmount/showmount.c | 12 |
2 files changed, 15 insertions, 6 deletions
diff --git a/usr.bin/showmount/showmount.8 b/usr.bin/showmount/showmount.8 index fe84e1e..05c89a9 100644 --- a/usr.bin/showmount/showmount.8 +++ b/usr.bin/showmount/showmount.8 @@ -42,7 +42,7 @@ .Nd show remote nfs mounts on host .Sh SYNOPSIS .Nm showmount -.Op Fl ade +.Op Fl ade3 .Op Ar host .Sh DESCRIPTION .Nm Showmount @@ -56,7 +56,10 @@ file systems mounted on the host. See .%T "NFS: Network File System Protocol Specification" , RFC 1094, -Appendix A , +Appendix A, +and +.%T "NFS: Network File System Version 3 Protocol Specification" , +Appendix I, for a detailed description of the protocol. .Bl -tag -width Ds .It Fl a @@ -70,6 +73,8 @@ List directory paths of mount points instead of hosts Show the .Ar host Ns 's exports list +.It Fl 3 +Use mount protocol Version 3, compatible with NFS Version 3. .El .Sh SEE ALSO .Xr mount 1 , diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index e5a3752..8cb342d 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -90,6 +90,7 @@ int xdr_mntdump(), xdr_exports(); * This command queries the NFS mount daemon for it's mount list and/or * it's exports list and prints them out. * See "NFS: Network File System Protocol Specification, RFC1094, Appendix A" + * and the "Network File System Protocol XXX.." * for detailed information on the protocol. */ main(argc, argv) @@ -101,12 +102,12 @@ main(argc, argv) register struct grouplist *grp; extern char *optarg; extern int optind; - register int rpcs = 0; + register int rpcs = 0, mntvers = 1; char ch; char *host; int estat; - while ((ch = getopt(argc, argv, "ade")) != EOF) + while ((ch = getopt(argc, argv, "ade3")) != EOF) switch((char)ch) { case 'a': if (type == 0) { @@ -125,6 +126,9 @@ main(argc, argv) case 'e': rpcs |= DOEXPORTS; break; + case '3': + mntvers = 3; + break; case '?': default: usage(); @@ -141,7 +145,7 @@ main(argc, argv) rpcs = DODUMP; if (rpcs & DODUMP) - if ((estat = callrpc(host, RPCPROG_MNT, RPCMNT_VER1, + if ((estat = callrpc(host, RPCPROG_MNT, mntvers, RPCMNT_DUMP, xdr_void, (char *)0, xdr_mntdump, (char *)&mntdump)) != 0) { clnt_perrno(estat); @@ -149,7 +153,7 @@ main(argc, argv) exit(1); } if (rpcs & DOEXPORTS) - if ((estat = callrpc(host, RPCPROG_MNT, RPCMNT_VER1, + if ((estat = callrpc(host, RPCPROG_MNT, mntvers, RPCMNT_EXPORT, xdr_void, (char *)0, xdr_exports, (char *)&exports)) != 0) { clnt_perrno(estat); |