NFS updates

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4647 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-04-23 20:33:25 +00:00
parent 31640bb6a6
commit 0073ac83ff
7 changed files with 13 additions and 54 deletions
+6 -10
View File
@@ -55,7 +55,7 @@
# include <nuttx/fs/mkfatfs.h>
# endif
# ifdef CONFIG_NFS
# include <netinet/in.h>
# include <sys/socket.h>
# include <nuttx/fs/nfs.h>
# endif
#endif
@@ -1230,8 +1230,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#else
struct in_addr inaddr;
#endif
bool tcp = false;
int ret;
int tcp = 0;
/* Get the NFS mount options */
@@ -1267,15 +1267,11 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
if (protocol)
{
if (!strncmp(protocol, "tcp", 3))
if (strncmp(protocol, "tcp", 3) == 0)
{
tcp = 1;
tcp = true;
}
else if (!strncmp(protocol, "udp", 3))
{
tcp = 0;
}
else
else if (!strncmp(protocol, "udp", 3) != 0)
{
nsh_output(vtbl, g_fmtarginvalid, argv[0]);
badarg = true;
@@ -1344,7 +1340,7 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
memset(&data, 0, sizeof(data));
data.version = 3;
data.proto = (tcp) ? 6 : 17;
dato.sotype = (tcp) ? 0 : 1;
data.sotype = (tcp) ? 0 : 1;
sin->sin_family = 2;
sin->sin_port = htons(2049);
sin->sin_addr = inaddr;