diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-08 18:56:01 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-08 18:56:01 +0000 |
commit | dad99a79d504be1baafee49faee8e507b05be9c6 (patch) | |
tree | acc0a9bb40b04c8e349e7db48cf8e1a66eb8a62f /nuttx/fs | |
parent | 01f271d39229dfd51f18e548f6a233141831064d (diff) | |
download | px4-firmware-dad99a79d504be1baafee49faee8e507b05be9c6.tar.gz px4-firmware-dad99a79d504be1baafee49faee8e507b05be9c6.tar.bz2 px4-firmware-dad99a79d504be1baafee49faee8e507b05be9c6.zip |
NFS update
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4818 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/fs')
-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 |
3 files changed, 14 insertions, 20 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; |