diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-05 23:17:25 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-05 23:17:25 +0000 |
commit | 5ec5d2ad4dc73eb8235d42f6b823754b53d7223d (patch) | |
tree | 3d90f49b12de4032eef21df067f4d2dff75a3221 /apps/nshlib/nsh_fscmds.c | |
parent | fffb5bd4f05cf422e06f650f4d13b40fe9675463 (diff) | |
download | nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.tar.gz nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.tar.bz2 nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.zip |
Add GPIO support to STMPE11 driver; NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4701 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh_fscmds.c')
-rw-r--r-- | apps/nshlib/nsh_fscmds.c | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c index 28a779292..eefa5e2a4 100644 --- a/apps/nshlib/nsh_fscmds.c +++ b/apps/nshlib/nsh_fscmds.c @@ -1225,7 +1225,6 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *address; FAR char *target; FAR char *protocol; - struct sockaddr_in *sin; bool badarg = false; #ifdef CONFIG_NET_IPv6 struct in6_addr inaddr; @@ -1337,35 +1336,25 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) return ERROR; } - /* Create an instance of the sockaddr_in state structure */ - - sin = (struct sockaddr_in *)zalloc(sizeof(struct sockaddr_in)); - if (!sin) - { - nsh_output(vtbl, g_fmtcmdoutofmemory, argv[0]); - return -ENOMEM; - } - /* Place all of the NFS arguements into the nfs_args structure */ memset(&data, 0, sizeof(data)); - data.version = NFS_ARGSVERSION; - data.proto = (tcp) ? IPPROTO_TCP : IPPROTO_UDP; - data.sotype = (tcp) ? SOCK_STREAM : SOCK_DGRAM; - sin->sin_family = AF_INET; - sin->sin_port = htons(NFS_PORT); - sin->sin_addr = inaddr; - data.addr = (struct sockaddr *)sin; - data.addrlen = sizeof(struct sockaddr); - data.flags = NFSMNT_NFSV3; - data.retrans = 3; - data.acregmin = 3; - data.acregmax = 60; - data.acdirmin = 30; - data.acdirmax = 60; - data.rsize = 0; - data.wsize = 0; - data.timeo = (tcp) ? 70 : 7; + 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.flags = NFSMNT_NFSV3; + data.retrans = 3; + data.acregmin = 3; + data.acregmax = 60; + data.acdirmin = 30; + data.acdirmax = 60; + data.rsize = 0; + data.wsize = 0; + data.timeo = (tcp) ? 70 : 7; /* Perform the mount */ |