git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4707 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-05-07 11:49:16 +00:00
parent 7d0eb845e0
commit 4eae928050

View File

@ -1225,6 +1225,7 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
FAR char *address;
FAR char *target;
FAR char *protocol;
FAR struct sockaddr_in *sin;
bool badarg = false;
#ifdef CONFIG_NET_IPv6
struct in6_addr inaddr;
@ -1338,14 +1339,16 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Place all of the NFS arguements into the nfs_args structure */
sin = (FAR struct sockaddr_in *)&data.addr;
sin->sin_family = AF_INET;
sin->sin_port = htons(NFS_PORT);
sin->sin_addr = inaddr;
memset(&data, 0, sizeof(data));
data.version = NFS_ARGSVERSION;
data.proto = (tcp) ? IPPROTO_TCP : IPPROTO_UDP;
data.sotype = (tcp) ? SOCK_STREAM : SOCK_DGRAM;
data.addr.sin_family = AF_INET;
data.addr.sin_port = htons(NFS_PORT);
data.addr.sin_addr = inaddr;
data.addrlen = sizeof(struct sockaddr);
data.addrlen = sizeof(struct sockaddr_in);
data.flags = NFSMNT_NFSV3;
data.retrans = 3;
data.acregmin = 3;