git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4707 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-05-07 11:49:16 +00:00
parent f478d3f6b1
commit 6aadb593e2
1 changed files with 7 additions and 4 deletions

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;