diff options
author | dfr <dfr@FreeBSD.org> | 2009-06-24 18:42:21 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2009-06-24 18:42:21 +0000 |
commit | ec9ddec04ca1bcd7e7bb514dfc6970627ee47872 (patch) | |
tree | bbae5223b9078101f704aa848f53e3f5f9e20cd7 /usr.sbin/rpc.umntall/rpc.umntall.c | |
parent | 6c60345b340131c66e68bbef66500d1f0eefb556 (diff) | |
download | FreeBSD-src-ec9ddec04ca1bcd7e7bb514dfc6970627ee47872.zip FreeBSD-src-ec9ddec04ca1bcd7e7bb514dfc6970627ee47872.tar.gz |
Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation
and will be removed.
Diffstat (limited to 'usr.sbin/rpc.umntall/rpc.umntall.c')
-rw-r--r-- | usr.sbin/rpc.umntall/rpc.umntall.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/rpc.umntall/rpc.umntall.c b/usr.sbin/rpc.umntall/rpc.umntall.c index b79e478..a64fae6 100644 --- a/usr.sbin/rpc.umntall/rpc.umntall.c +++ b/usr.sbin/rpc.umntall/rpc.umntall.c @@ -35,7 +35,7 @@ static const char rcsid[] = #include <sys/mount.h> #include <rpc/rpc.h> -#include <nfs/rpcv2.h> +#include <rpcsvc/mount.h> #include <err.h> #include <netdb.h> @@ -176,18 +176,18 @@ do_umntall(char *hostname) { try.tv_sec = 3; try.tv_usec = 0; - clp = clnt_create_timed(hostname, RPCPROG_MNT, RPCMNT_VER1, "udp", + clp = clnt_create_timed(hostname, MOUNTPROG, MOUNTVERS, "udp", &try); if (clp == NULL) { - warnx("%s: %s", hostname, clnt_spcreateerror("RPCPROG_MNT")); + warnx("%s: %s", hostname, clnt_spcreateerror("MOUNTPROG")); return (0); } clp->cl_auth = authunix_create_default(); - clnt_stat = clnt_call(clp, RPCMNT_UMNTALL, + clnt_stat = clnt_call(clp, MOUNTPROC_UMNTALL, (xdrproc_t)xdr_void, (caddr_t)0, (xdrproc_t)xdr_void, (caddr_t)0, try); if (clnt_stat != RPC_SUCCESS) - warnx("%s: %s", hostname, clnt_sperror(clp, "RPCMNT_UMNTALL")); + warnx("%s: %s", hostname, clnt_sperror(clp, "MOUNTPROC_UMNTALL")); auth_destroy(clp->cl_auth); clnt_destroy(clp); return (clnt_stat == RPC_SUCCESS); @@ -204,17 +204,17 @@ do_umount(char *hostname, char *dirp) { try.tv_sec = 3; try.tv_usec = 0; - clp = clnt_create_timed(hostname, RPCPROG_MNT, RPCMNT_VER1, "udp", + clp = clnt_create_timed(hostname, MOUNTPROG, MOUNTVERS, "udp", &try); if (clp == NULL) { - warnx("%s: %s", hostname, clnt_spcreateerror("RPCPROG_MNT")); + warnx("%s: %s", hostname, clnt_spcreateerror("MOUNTPROG")); return (0); } clp->cl_auth = authsys_create_default(); - clnt_stat = clnt_call(clp, RPCMNT_UMOUNT, (xdrproc_t)xdr_dir, dirp, + clnt_stat = clnt_call(clp, MOUNTPROC_UMNT, (xdrproc_t)xdr_dir, dirp, (xdrproc_t)xdr_void, (caddr_t)0, try); if (clnt_stat != RPC_SUCCESS) - warnx("%s: %s", hostname, clnt_sperror(clp, "RPCMNT_UMOUNT")); + warnx("%s: %s", hostname, clnt_sperror(clp, "MOUNTPROC_UMNT")); auth_destroy(clp->cl_auth); clnt_destroy(clp); return (clnt_stat == RPC_SUCCESS); @@ -255,7 +255,7 @@ is_mounted(char *hostname, char *dirp) { */ int xdr_dir(XDR *xdrsp, char *dirp) { - return (xdr_string(xdrsp, &dirp, RPCMNT_PATHLEN)); + return (xdr_string(xdrsp, &dirp, MNTPATHLEN)); } static void |