NFS update

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4538 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-03-28 23:27:24 +00:00
parent da091bc45e
commit 2ad4791dfa
8 changed files with 1169 additions and 256 deletions
+6
View File
@@ -53,6 +53,12 @@
* Pre-processor Definitions
****************************************************************************/
/* The NSH telnet console requires networking support (and TCP/IP) */
#ifndef CONFIG_NET
# undef CONFIG_NSH_TELNET
#endif
/****************************************************************************
* Private Types
****************************************************************************/
+2
View File
@@ -2602,3 +2602,5 @@
user NX server because of lack of use.
* graphics/nxconsole: The NX text console is basically function (in multi-
user NX mode only).
* arch/arm/src/stm32/stm32_i2c.c: Correct a bug in the STM32 I2C driver. The
behavior of I2C status bits seems to be different between F1 and F4.
+6 -7
View File
@@ -51,10 +51,6 @@
* Pre-processor Definitions
****************************************************************************/
#define NFSOP(nmp, op) (*nmp->nm_nfsops->nn_##op)
#define NFSHASOP(nmp, op) (nmp->nm_nfsops->nn_##op != NULL)
#define NFSDAT(nmp, nam) (nmp->nm_nfsops->nn_##nam)
/* Convert mount ptr to nfsmount ptr. */
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->i_private))
@@ -72,9 +68,11 @@ struct nfsmount
{
int nm_flag; /* Flags for soft/hard... */
int nm_state; /* Internal state flags */
struct inode *nm_mountp; /* Vfs structure for this filesystem */
struct nfsnode *nfs_head; /* A list to all files opened on this mountpoint */
bool nfs_mounted; /* true: The file system is ready */
struct inode *nm_blkdriver; /* Vfs structure for this filesystem */
struct nfsnode *nm_head; /* A list to all files opened on this mountpoint */
bool nm_mounted; /* true: The file system is ready */
sem_t nm_sem; /* Used to assume thread-safe access */
nfstype nfsv3_type; /* File type */
int nm_numgrps; /* Max. size of groupslist */
nfsfh_t nm_fh; /* File handle of root dir */
int nm_fhsize; /* Size of root file handle */
@@ -101,6 +99,7 @@ struct nfsmount
int nm_acregmin; /* Reg file attr cache min lifetime */
int nm_acregmax; /* Reg file attr cache max lifetime */
unsigned char nm_verf[NFSX_V3WRITEVERF]; /* V3 write verifier */
uint8_t *nm_buffer; /* This is an allocated buffer to hold one sector*/
};
/****************************************************************************
+2 -3
View File
@@ -111,15 +111,14 @@ struct sillyrename
struct nfsnode
{
struct nfsnode *nfs_next; /* Retained in a singly linked list filehandle/node tree. */
bool nfs_open; /* true: The file is (still) open */
struct nfsnode *n_next; /* Retained in a singly linked list filehandle/node tree. */
bool n_open; /* true: The file is (still) open */
uint64_t n_size; /* Current size of file */
struct nfs_fattr n_fattr; /* nfs file attribute cache */
time_t n_attrstamp; /* Attr. cache timestamp */
struct timespec n_mtime; /* Prev modify time. */
time_t n_ctime; /* Prev create time. */
nfsfh_t *n_fhp; /* NFS File Handle */
nfstype nfsv3_type; /* File type */
struct inode *n_inode; /* associated inode */
int n_error; /* Save write error value */
union
-3
View File
@@ -95,7 +95,6 @@ void nfs_init(void)
rpcclnt_init();
}
/* XXXMARIUS: name collision */
int nfsx_connect(struct nfsmount *nmp)
{
struct rpcclnt *rpc;
@@ -144,8 +143,6 @@ int nfsx_connect(struct nfsmount *nmp)
/* NFS disconnect. Clean up and unlink. */
/* XXXMARIUS: name collision */
void nfsx_disconnect(struct nfsmount *nmp)
{
rpcclnt_disconnect(&nmp->nm_rpcclnt);
+842
View File
File diff suppressed because it is too large Load Diff
+301 -243
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -116,6 +116,13 @@ struct fs_nxffsdir_s
off_t nx_offset; /* Offset to the next inode */
};
#endif
#ifdef CONFIG_NFS
struct fs_nfsdir_s
{
uint32_t cookie[2];
}
#endif
#endif /* CONFIG_DISABLE_MOUNTPOINT */
struct fs_dirent_s
@@ -167,6 +174,9 @@ struct fs_dirent_s
#ifdef CONFIG_FS_NXFFS
struct fs_nxffsdir_s nxffs;
#endif
#ifdef CONFIG_NFS
struct fs_nfsdir_s nfs;
#endif
#endif /* !CONFIG_DISABLE_MOUNTPOINT */
} u;