diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-08 18:56:01 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-08 18:56:01 +0000 |
commit | c59c1efa5e7c9f89665a1e9a4d4792094684f5e9 (patch) | |
tree | acc0a9bb40b04c8e349e7db48cf8e1a66eb8a62f | |
parent | 5f0d8a417e3b698ee0e382473dd2fa05d1d494e6 (diff) | |
download | px4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.tar.gz px4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.tar.bz2 px4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.zip |
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4818 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/fs/nfs/nfs_vfsops.c | 14 | ||||
-rw-r--r-- | nuttx/fs/nfs/rpc.h | 2 | ||||
-rw-r--r-- | nuttx/fs/nfs/rpc_clnt.c | 18 | ||||
-rw-r--r-- | nuttx/net/uip/uip_udpconn.c | 5 |
4 files changed, 17 insertions, 22 deletions
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c index b538c2743..655d552d1 100644 --- a/nuttx/fs/nfs/nfs_vfsops.c +++ b/nuttx/fs/nfs/nfs_vfsops.c @@ -764,7 +764,7 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np, } /* Check for EOF */ - +#if 0 /* This logic is NOT correct */ if (*ptr != 0) { np->n_direofoffset = fxdr_hyper(&dir->u.nfs.cookie[0]); @@ -776,11 +776,11 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np, fdbg("End of directory\n"); error = ENOENT; } +#endif /* Otherwise, there is an entry. Get the file ID and point to the length */ + /* Missing logic to get the file ID */ -// dir->fd_dir.d_type = entry->fileid; -#warning "This must match the type values in dirent.h" ptr += 2; /* Get the length and point to the name */ @@ -807,7 +807,13 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np, ptr++; /* Just skip over the nextentry for now */ /* Return the Type of the node to the caller */ - /* MISSING LOGIC */ + /* MISSING LOGIC TO DETERMINE FILE TYPE -- Need to (1) get nfstype, and (2) + * map NFREG, NFDIR, etc. to values in dirent.h. + */ + + dir->fd_dir.d_type = DTYPE_FILE; +// dir->fd_dir.d_type = entry->fileid; +#warning "This must match the type values in dirent.h" /* Return the name of the node to the caller */ diff --git a/nuttx/fs/nfs/rpc.h b/nuttx/fs/nfs/rpc.h index ed7b13184..9a0b9fc01 100644 --- a/nuttx/fs/nfs/rpc.h +++ b/nuttx/fs/nfs/rpc.h @@ -387,14 +387,12 @@ struct rpc_reply_header struct rpc_reply_pmap { struct rpc_reply_header rh; - uint32_t status; struct call_result_pmap pmap; }; struct rpc_reply_mount { struct rpc_reply_header rh; - uint32_t status; struct call_result_mount mount; }; diff --git a/nuttx/fs/nfs/rpc_clnt.c b/nuttx/fs/nfs/rpc_clnt.c index 00dac941c..e278bc628 100644 --- a/nuttx/fs/nfs/rpc_clnt.c +++ b/nuttx/fs/nfs/rpc_clnt.c @@ -465,7 +465,6 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, uint32_t len; int sotype; #endif - int rcvflg; int error = 0; int errval; @@ -541,9 +540,8 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, do { socklen_t fromlen = sizeof(*rep->r_rpcclnt->rc_name) - rcvflg = MSG_WAITALL; nbytes = psock_recvfrom(so, reply, len, - &rcvflg, rep->r_rpcclnt->rc_name, + MSG_WAITALL, rep->r_rpcclnt->rc_name, &fromlen); if (nbytes < 0) { @@ -597,9 +595,8 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, do { socklen_t fromlen = sizeof(*rep->r_rpcclnt->rc_name); - rcvflg = MSG_WAITALL; nbytes = psock_recvfrom(so, reply, sizeof(*reply), - &rcvflg, rep->r_rpcclnt->rc_name, + MSG_WAITALL, rep->r_rpcclnt->rc_name, &fromlen); if (nbytes < 0) { @@ -640,8 +637,7 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, do { socklen_t fromlen = sizeof(*rep->r_rpcclnt->rc_name); - rcvflg = 0; - nbytes = psock_recvfrom(so, reply, sizeof(*reply), &rcvflg, + nbytes = psock_recvfrom(so, reply, sizeof(*reply), 0, rep->r_rpcclnt->rc_name, &fromlen); if (nbytes < 0) { @@ -659,11 +655,6 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, } while (errval == EWOULDBLOCK || nbytes == 0); - if ((rcvflg & MSG_EOR) == 0) - { - fdbg("Egad!!\n"); - } - if (nbytes < 0) { error = errval; @@ -714,8 +705,7 @@ static int rpcclnt_receive(struct rpctask *rep, struct sockaddr *aname, } socklen_t fromlen = sizeof(struct sockaddr); - rcvflg = 0; - nbytes = psock_recvfrom(so, reply, len, rcvflg, aname, &fromlen); + nbytes = psock_recvfrom(so, reply, len, 0, aname, &fromlen); if (nbytes < 0) { errval = errno; diff --git a/nuttx/net/uip/uip_udpconn.c b/nuttx/net/uip/uip_udpconn.c index 2babad75f..3c4ee5add 100644 --- a/nuttx/net/uip/uip_udpconn.c +++ b/nuttx/net/uip/uip_udpconn.c @@ -1,8 +1,8 @@ /**************************************************************************** * net/uip/uip_udpconn.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Large parts of this file were leveraged from uIP logic: * @@ -313,6 +313,7 @@ struct uip_udp_conn *uip_udpactive(struct uip_udpip_hdr *buf) uiphdr_ipaddr_cmp(buf->srcipaddr, &conn->ripaddr))) { /* Matching connection found.. return a reference to it */ + break; } |