diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-25 23:22:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-25 23:22:09 +0000 |
commit | 5145ba33ec23c19f84c0d56dc182ea90f7a437d6 (patch) | |
tree | 6d8506f771c94896ef7fb4877589980ab413ee05 /nuttx/fs/nfs/nfs_vfsops.c | |
parent | 29d916f11e865afefe144aba44146a7d4acca5e4 (diff) | |
download | px4-nuttx-5145ba33ec23c19f84c0d56dc182ea90f7a437d6.tar.gz px4-nuttx-5145ba33ec23c19f84c0d56dc182ea90f7a437d6.tar.bz2 px4-nuttx-5145ba33ec23c19f84c0d56dc182ea90f7a437d6.zip |
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4657 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_vfsops.c')
-rw-r--r-- | nuttx/fs/nfs/nfs_vfsops.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c index 4679239c1..c889a603f 100644 --- a/nuttx/fs/nfs/nfs_vfsops.c +++ b/nuttx/fs/nfs/nfs_vfsops.c @@ -65,6 +65,7 @@ #include <nuttx/fs/dirent.h> #include <nuttx/fs/fs.h> #include <nuttx/fs/nfs.h> +#include <semaphore.h> #include <net/if.h> #include <netinet/in.h> @@ -984,30 +985,15 @@ int mountnfs(struct nfs_args *argp, struct sockaddr *nam, void **handle) struct nfsmount *nmp; int error; - /* Open the block driver */ -/* - if (!blkdriver || !blkdriver->u.i_bops) - { - fdbg("No block driver/ops\n"); - return -ENODEV; - } - - if (blkdriver->u.i_bops->open && - blkdriver->u.i_bops->open(blkdriver) != OK) - { - fdbg("No open method\n"); - return -ENODEV; - } -*/ /* Create an instance of the mountpt state structure */ -/* + nmp = (struct nfsmount *)kzalloc(sizeof(struct nfsmount)); if (!nmp) { fdbg("Failed to allocate mountpoint structure\n"); return -ENOMEM; } -*/ + /* Initialize the allocated mountpt state structure. The filesystem is * responsible for one reference ont the blkdriver inode and does not * have to addref() here (but does have to release in ubind(). @@ -1015,8 +1001,8 @@ int mountnfs(struct nfs_args *argp, struct sockaddr *nam, void **handle) sem_init(&nmp->nm_sem, 0, 0); /* Initialize the semaphore that controls access */ -//nmp->nm_blkdriver = blkdriver; /* Save the block driver reference */ nfs_init(); + nmp->nm_flag = argp->flags; nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; nmp->nm_wsize = NFS_WSIZE; @@ -1054,6 +1040,7 @@ int mountnfs(struct nfs_args *argp, struct sockaddr *nam, void **handle) /* Mounted! */ nmp->nm_mounted = true; + nmp->nm_so = nmp->nm_rpcclnt->rc_so; *handle = &nmp; nfs_semgive(nmp); @@ -1109,7 +1096,7 @@ static int nfs_bind(struct inode *blkdriver, const void *data, void **handle) } /**************************************************************************** - * Name: nfs_unmount + * Name: nfs_unbind * * Description: This implements the filesystem portion of the umount * operation. |