]> git.decadent.org.uk Git - nfs-utils.git/commit
mount: remove legacy version of nfs_name_to_address()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 18 May 2009 15:17:49 +0000 (11:17 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 18 May 2009 15:17:49 +0000 (11:17 -0400)
commitbfa1df2e24b7f8c7fee299049a6ee36e1262dacd
tree48a609a9d8c7945f61d90b1ab1b236546b1bd260
parent5d253e3e326bfcf0e8a342bca53f1b4db120a7a9
mount: remove legacy version of nfs_name_to_address()

Currently we have two separate copies of nfs_name_to_address() since
some older glibc's don't define AI_ADDRCONFIG.  This means extra
work to build- and run-test both functions when code is changed in
this area.

It is also the case that gethostbyname(3) is deprecated, and should
not be used in new code.

Remove the legacy code in favor of always using getaddrinfo(3).

We can also get rid of nfs_name_to_address()'s @family argument as
well.

Note also this addresses a bug in nfsumount.c -- it was calling
nfs_name_to_address() with AF_UNSPEC unconditionally, even if the
legacy version of nfs_name_to_address(), which doesn't support
AF_UNSPEC, was in use.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/network.c
utils/mount/network.h
utils/mount/nfsumount.c
utils/mount/stropts.c