summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-08-24 13:11:22 -0400
committerNeil Brown <neilb@suse.de>2007-08-25 08:19:32 +1000
commit60fd6cd0ada4f501d6d6bcbc3e14950d453c428d (patch)
tree94f99207bfed09e067621eaf2dc2706959fa19a3
parentfb874be0226ae35367f10f260353a76716da9346 (diff)
downloadnfs-utils-60fd6cd0ada4f501d6d6bcbc3e14950d453c428d.tar.gz
nfs-utils-60fd6cd0ada4f501d6d6bcbc3e14950d453c428d.tar.xz
nfs-utils-60fd6cd0ada4f501d6d6bcbc3e14950d453c428d.zip
mount.nfs: Remove get_my_ipv4addr() from append_addr_opt()
The result of the get_my_ipv4addr() function is not used in append_addr_opt(), so remove the call and the ip_addr variable. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r--utils/mount/stropts.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index e43bbf4..cc13325 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -168,7 +168,7 @@ static void extract_interesting_options(char *opts)
*/
static int append_addr_opt(const char *spec, char **extra_opts)
{
- static char hostdir[1024], new_opts[1024], ip_addr[255];
+ static char hostdir[1024], new_opts[1024];
char *hostname, *dirname, *s, *old_opts;
struct sockaddr_in addr;
@@ -186,8 +186,6 @@ static int append_addr_opt(const char *spec, char **extra_opts)
if (!fill_ipv4_sockaddr(hostname, &addr))
return 0;
- if (!get_my_ipv4addr(ip_addr, sizeof(ip_addr)))
- return 0;
/* add IP address to mtab options for use when unmounting */
s = inet_ntoa(addr.sin_addr);