diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-23 20:33:25 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-23 20:33:25 +0000 |
commit | 0073ac83ffd1e57093141ed081eecdd906701e8e (patch) | |
tree | 34fc95aa94c99c8990295e1c6db3fe3411a29204 | |
parent | 31640bb6a691fa4e67157ef6ae947d78630716c4 (diff) | |
download | px4-firmware-0073ac83ffd1e57093141ed081eecdd906701e8e.tar.gz px4-firmware-0073ac83ffd1e57093141ed081eecdd906701e8e.tar.bz2 px4-firmware-0073ac83ffd1e57093141ed081eecdd906701e8e.zip |
NFS updates
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4647 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r-- | apps/nshlib/nsh_fscmds.c | 16 | ||||
-rw-r--r-- | nuttx/fs/Makefile | 2 | ||||
-rw-r--r-- | nuttx/fs/nfs/Make.defs | 2 | ||||
-rw-r--r-- | nuttx/fs/nfs/nfs_socket.c | 5 | ||||
-rw-r--r-- | nuttx/fs/nfs/nfs_vfsops.c | 1 | ||||
-rw-r--r-- | nuttx/include/nuttx/fs/nfs.h | 40 | ||||
-rw-r--r-- | nuttx/net/net_monitor.c | 1 |
7 files changed, 13 insertions, 54 deletions
diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c index db01d6d90..b1a0963cf 100644 --- a/apps/nshlib/nsh_fscmds.c +++ b/apps/nshlib/nsh_fscmds.c @@ -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; diff --git a/nuttx/fs/Makefile b/nuttx/fs/Makefile index 57a01c9c4..00227e1d0 100644 --- a/nuttx/fs/Makefile +++ b/nuttx/fs/Makefile @@ -115,7 +115,7 @@ $(BIN): $(OBJS) done ; ) .depend: Makefile $(SRCS) - @$(MKDEP) --dep-path . $(MMAPDEPPATH) $(FATDEPPATH) $(ROMFSDEPPATH) $(NXFFSDEPPATH) \ + @$(MKDEP) --dep-path . $(MMAPDEPPATH) $(FATDEPPATH) $(ROMFSDEPPATH) $(NXFFSDEPPATH) $(NFSDEPPATH) \ $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @touch $@ diff --git a/nuttx/fs/nfs/Make.defs b/nuttx/fs/nfs/Make.defs index bfe1265c3..c3c323bc3 100644 --- a/nuttx/fs/nfs/Make.defs +++ b/nuttx/fs/nfs/Make.defs @@ -46,5 +46,5 @@ CSRCS += rpc_clnt.c nfs_socket.c nfs_util.c nfs_vfsops.c # Argument for dependency checking -NFSDEPPATH = --dep-path rpc +NFSDEPPATH = --dep-path nfs endif diff --git a/nuttx/fs/nfs/nfs_socket.c b/nuttx/fs/nfs/nfs_socket.c index feb405719..d659a097e 100644 --- a/nuttx/fs/nfs/nfs_socket.c +++ b/nuttx/fs/nfs/nfs_socket.c @@ -48,6 +48,7 @@ #include <nuttx/fs/nfs.h> +#include "nfs.h" #include "rpc.h" #include "rpc_v2.h" #include "nfs_proto.h" @@ -219,12 +220,12 @@ tryagain: if (error == ESTALE) { ndbg("%s: ESTALE on mount from server \n", - nmp->nm_rpcclnt.rc_prog->prog_name); + nmp->nm_rpcclnt->rc_prog->prog_name); } else { ndbg("%s: unknown error %d from server \n", - nmp->nm_rpcclnt.rc_prog->prog_name, error); + nmp->nm_rpcclnt->rc_prog->prog_name, error); } goto out; diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c index 89f135d7c..478271419 100644 --- a/nuttx/fs/nfs/nfs_vfsops.c +++ b/nuttx/fs/nfs/nfs_vfsops.c @@ -69,6 +69,7 @@ #include <net/if.h> #include <netinet/in.h> +#include "nfs.h" #include "rpc_v2.h" #include "rpc.h" #include "nfs_proto.h" diff --git a/nuttx/include/nuttx/fs/nfs.h b/nuttx/include/nuttx/fs/nfs.h index b0ded4db4..08f9b94ca 100644 --- a/nuttx/include/nuttx/fs/nfs.h +++ b/nuttx/include/nuttx/fs/nfs.h @@ -269,46 +269,6 @@ struct nfsd_srvargs }; #endif -/* Stats structure */ - -struct nfsstats -{ - uint64_t attrcache_hits; - uint64_t attrcache_misses; - uint64_t lookupcache_hits; - uint64_t lookupcache_misses; - uint64_t direofcache_hits; - uint64_t direofcache_misses; - uint64_t biocache_reads; - uint64_t read_bios; - uint64_t read_physios; - uint64_t biocache_writes; - uint64_t write_bios; - uint64_t write_physios; - uint64_t biocache_readlinks; - uint64_t readlink_bios; - uint64_t biocache_readdirs; - uint64_t readdir_bios; - uint64_t rpccnt[NFS_NPROCS]; - uint64_t rpcretries; - uint64_t srvrpccnt[NFS_NPROCS]; - uint64_t srvrpc_errs; - uint64_t srv_errs; - uint64_t rpcrequests; - uint64_t rpctimeouts; - uint64_t rpcunexpected; - uint64_t rpcinvalid; - uint64_t srvcache_inproghits; - uint64_t srvcache_idemdonehits; - uint64_t srvcache_nonidemdonehits; - uint64_t srvcache_misses; - uint64_t forcedsync; - uint64_t srvnqnfs_leases; - uint64_t srvnqnfs_maxleases; - uint64_t srvnqnfs_getleases; - uint64_t srvvop_writes; -}; - #ifdef COMP /* The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts. * What should be in this set is open to debate, but I believe that since diff --git a/nuttx/net/net_monitor.c b/nuttx/net/net_monitor.c index 40d4196b2..4bdae4ccf 100644 --- a/nuttx/net/net_monitor.c +++ b/nuttx/net/net_monitor.c @@ -41,6 +41,7 @@ #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) #include <stdint.h> +#include <assert.h> #include <debug.h> #include "net_internal.h" |