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/nfsd/nfsd.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/nfsd/nfsd.c')
-rw-r--r-- | usr.sbin/nfsd/nfsd.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index 0da53cf..a822eb3 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -54,11 +54,10 @@ static const char rcsid[] = #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> +#include <rpcsvc/nfs_prot.h> #include <netdb.h> #include <arpa/inet.h> -#include <nfs/rpcv2.h> -#include <nfs/nfsproto.h> #include <nfsserver/nfs.h> #include <nfs/nfssvc.h> @@ -268,8 +267,8 @@ main(int argc, char **argv) err(1, "getnetconfigent udp failed"); nb_udp.buf = ai_udp->ai_addr; nb_udp.len = nb_udp.maxlen = ai_udp->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp, &nb_udp)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_udp, &nb_udp))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_udp, &nb_udp)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_udp, &nb_udp))) err(1, "rpcb_set udp failed"); freeaddrinfo(ai_udp); } @@ -287,8 +286,8 @@ main(int argc, char **argv) err(1, "getnetconfigent udp6 failed"); nb_udp6.buf = ai_udp6->ai_addr; nb_udp6.len = nb_udp6.maxlen = ai_udp6->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp6, &nb_udp6)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_udp6, &nb_udp6))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_udp6, &nb_udp6)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_udp6, &nb_udp6))) err(1, "rpcb_set udp6 failed"); freeaddrinfo(ai_udp6); } @@ -306,8 +305,8 @@ main(int argc, char **argv) err(1, "getnetconfigent tcp failed"); nb_tcp.buf = ai_tcp->ai_addr; nb_tcp.len = nb_tcp.maxlen = ai_tcp->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp, &nb_tcp)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_tcp, &nb_tcp))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_tcp, &nb_tcp)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp, &nb_tcp))) err(1, "rpcb_set tcp failed"); freeaddrinfo(ai_tcp); } @@ -325,8 +324,8 @@ main(int argc, char **argv) err(1, "getnetconfigent tcp6 failed"); nb_tcp6.buf = ai_tcp6->ai_addr; nb_tcp6.len = nb_tcp6.maxlen = ai_tcp6->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp6, &nb_tcp6)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_tcp6, &nb_tcp6))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_tcp6, &nb_tcp6)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp6, &nb_tcp6))) err(1, "rpcb_set tcp6 failed"); freeaddrinfo(ai_tcp6); } @@ -492,8 +491,8 @@ main(int argc, char **argv) err(1, "getnetconfigent udp failed"); nb_udp.buf = ai_udp->ai_addr; nb_udp.len = nb_udp.maxlen = ai_udp->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp, &nb_udp)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_udp, &nb_udp))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_udp, &nb_udp)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_udp, &nb_udp))) err(1, "rpcb_set udp failed"); freeaddrinfo(ai_udp); } @@ -561,8 +560,8 @@ main(int argc, char **argv) err(1, "getnetconfigent udp6 failed"); nb_udp6.buf = ai_udp6->ai_addr; nb_udp6.len = nb_udp6.maxlen = ai_udp6->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp6, &nb_udp6)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_udp6, &nb_udp6))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_udp6, &nb_udp6)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_udp6, &nb_udp6))) err(1, "rpcb_set udp6 failed"); freeaddrinfo(ai_udp6); } @@ -627,8 +626,8 @@ main(int argc, char **argv) err(1, "getnetconfigent tcp failed"); nb_tcp.buf = ai_tcp->ai_addr; nb_tcp.len = nb_tcp.maxlen = ai_tcp->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp, - &nb_tcp)) || (!rpcb_set(RPCPROG_NFS, 3, + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_tcp, + &nb_tcp)) || (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp, &nb_tcp))) err(1, "rpcb_set tcp failed"); freeaddrinfo(ai_tcp); @@ -702,8 +701,8 @@ main(int argc, char **argv) err(1, "getnetconfigent tcp6 failed"); nb_tcp6.buf = ai_tcp6->ai_addr; nb_tcp6.len = nb_tcp6.maxlen = ai_tcp6->ai_addrlen; - if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp6, &nb_tcp6)) || - (!rpcb_set(RPCPROG_NFS, 3, nconf_tcp6, &nb_tcp6))) + if ((!rpcb_set(NFS_PROGRAM, 2, nconf_tcp6, &nb_tcp6)) || + (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp6, &nb_tcp6))) err(1, "rpcb_set tcp6 failed"); freeaddrinfo(ai_tcp6); } @@ -871,8 +870,8 @@ reapchild(__unused int signo) void unregistration() { - if ((!rpcb_unset(RPCPROG_NFS, 2, NULL)) || - (!rpcb_unset(RPCPROG_NFS, 3, NULL))) + if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) || + (!rpcb_unset(NFS_PROGRAM, 3, NULL))) syslog(LOG_ERR, "rpcb_unset failed"); } |