diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-28 00:05:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-28 00:05:58 +0000 |
commit | 931bd2b8661c8ed4c923220490cbebc56d6c0065 (patch) | |
tree | 744ba3d223b0b158d74f077328ca226a19407d28 /nuttx/fs/romfs | |
parent | a67921192b48c4b0dcc5ac34d180c710ec6ea5d3 (diff) | |
download | px4-nuttx-931bd2b8661c8ed4c923220490cbebc56d6c0065.tar.gz px4-nuttx-931bd2b8661c8ed4c923220490cbebc56d6c0065.tar.bz2 px4-nuttx-931bd2b8661c8ed4c923220490cbebc56d6c0065.zip |
Re-organize header files so that file systems can be built outside of the nuttx tree; add a binfs file system to apps/namedapp
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3428 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/romfs')
-rw-r--r-- | nuttx/fs/romfs/fs_romfs.c | 17 | ||||
-rw-r--r-- | nuttx/fs/romfs/fs_romfs.h | 4 | ||||
-rw-r--r-- | nuttx/fs/romfs/fs_romfsutil.c | 1 |
3 files changed, 13 insertions, 9 deletions
diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c index 7abfb4b14..b2ffffaaf 100644 --- a/nuttx/fs/romfs/fs_romfs.c +++ b/nuttx/fs/romfs/fs_romfs.c @@ -1,7 +1,7 @@ /**************************************************************************** * rm/romfs/fs_romfs.h * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * References: Linux/Documentation/filesystems/romfs.txt @@ -58,6 +58,7 @@ #include <nuttx/fs.h> #include <nuttx/ioctl.h> +#include <nuttx/dirent.h> #include "fs_romfs.h" @@ -77,9 +78,9 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence); static int romfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static int romfs_opendir(struct inode *mountpt, const char *relpath, - struct internal_dir_s *dir); -static int romfs_readdir(struct inode *mountpt, struct internal_dir_s *dir); -static int romfs_rewinddir(struct inode *mountpt, struct internal_dir_s *dir); + struct fs_dirent_s *dir); +static int romfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir); +static int romfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir); static int romfs_bind(FAR struct inode *blkdriver, const void *data, void **handle); @@ -589,7 +590,7 @@ static int romfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ****************************************************************************/ static int romfs_opendir(struct inode *mountpt, const char *relpath, - struct internal_dir_s *dir) + struct fs_dirent_s *dir) { struct romfs_mountpt_s *rm; struct romfs_dirinfo_s dirinfo; @@ -653,7 +654,7 @@ errout_with_semaphore: * ****************************************************************************/ -static int romfs_readdir(struct inode *mountpt, struct internal_dir_s *dir) +static int romfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) { struct romfs_mountpt_s *rm; uint32_t linkoffset; @@ -748,7 +749,7 @@ errout_with_semaphore: * ****************************************************************************/ -static int romfs_rewinddir(struct inode *mountpt, struct internal_dir_s *dir) +static int romfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) { struct romfs_mountpt_s *rm; int ret; @@ -889,7 +890,6 @@ static int romfs_unbind(void *handle, FAR struct inode **blkdriver) /* Check if there are sill any files opened on the filesystem. */ - ret = OK; /* Assume success */ romfs_semtake(rm); if (rm->rm_head) { @@ -934,6 +934,7 @@ static int romfs_unbind(void *handle, FAR struct inode **blkdriver) sem_destroy(&rm->rm_sem); free(rm); + return OK; } romfs_semgive(rm); diff --git a/nuttx/fs/romfs/fs_romfs.h b/nuttx/fs/romfs/fs_romfs.h index b734f094f..111006788 100644 --- a/nuttx/fs/romfs/fs_romfs.h +++ b/nuttx/fs/romfs/fs_romfs.h @@ -1,7 +1,7 @@ /**************************************************************************** * fs/romfs/fs_romfs.h * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * References: Linux/Documentation/filesystems/romfs.txt @@ -47,6 +47,8 @@ #include <stdint.h> #include <stdbool.h> +#include <nuttx/dirent.h> + #include "../fs_internal.h" /**************************************************************************** diff --git a/nuttx/fs/romfs/fs_romfsutil.c b/nuttx/fs/romfs/fs_romfsutil.c index ee2eb8f16..d441c0c8b 100644 --- a/nuttx/fs/romfs/fs_romfsutil.c +++ b/nuttx/fs/romfs/fs_romfsutil.c @@ -52,6 +52,7 @@ #include <debug.h> #include <nuttx/ioctl.h> +#include <nuttx/dirent.h> #include "fs_romfs.h" |