diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-09 19:11:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-09 19:11:00 +0000 |
commit | cf0426d5964d50da8b21db6549ed19a987ee85e2 (patch) | |
tree | bfbdb400743a05f683c58cc1d8217d2f1d6ce8b9 /nuttx/fs | |
parent | 05dd8c79b40af0221973ba0ee19ee0066c3a8dde (diff) | |
download | px4-nuttx-cf0426d5964d50da8b21db6549ed19a987ee85e2.tar.gz px4-nuttx-cf0426d5964d50da8b21db6549ed19a987ee85e2.tar.bz2 px4-nuttx-cf0426d5964d50da8b21db6549ed19a987ee85e2.zip |
Simply conditional build; fix conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@275 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
36 files changed, 18 insertions, 137 deletions
diff --git a/nuttx/fs/Makefile b/nuttx/fs/Makefile index 0bae52215..ad99c137c 100644 --- a/nuttx/fs/Makefile +++ b/nuttx/fs/Makefile @@ -42,18 +42,21 @@ AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = fs_open.c fs_close.c fs_read.c fs_write.c fs_ioctl.c fs_dup.c \ fs_opendir.c fs_closedir.c fs_stat.c fs_readdir.c fs_readdirr.c \ - fs_seekdir.c fs_telldir.c fs_rewinddir.c fs_fsync.c fs_files.c \ + fs_seekdir.c fs_telldir.c fs_rewinddir.c fs_files.c \ fs_inode.c fs_inodefind.c fs_inodereserve.c fs_statfs.c \ fs_inoderemove.c fs_registerdriver.c fs_unregisterdriver.c \ fs_inodeaddref.c fs_inoderelease.c ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y) CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c \ - fs_mount.c fs_umount.c fs_unlink.c fs_mkdir.c fs_rmdir.c \ - fs_rename.c + fs_mount.c fs_umount.c \ + fs_fsync.c fs_unlink.c fs_rename.c \ + fs_mkdir.c fs_rmdir.c + ifeq ($(CONFIG_FS_FAT),y) CSRCS += fs_fat32.c fs_fat32util.c fs_fat32attrib.c endif endif + COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) diff --git a/nuttx/fs/fs_close.c b/nuttx/fs/fs_close.c index 91480e077..a704d1d5e 100644 --- a/nuttx/fs/fs_close.c +++ b/nuttx/fs/fs_close.c @@ -49,8 +49,6 @@ * Global Functions ****************************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int close(int fd) { FAR struct filelist *list; @@ -112,4 +110,3 @@ int close(int fd) return ERROR; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_closedir.c b/nuttx/fs/fs_closedir.c index c99853110..5f20743c8 100644 --- a/nuttx/fs/fs_closedir.c +++ b/nuttx/fs/fs_closedir.c @@ -71,8 +71,6 @@ * ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int closedir(FAR DIR *dirp) { struct internal_dir_s *idir = (struct internal_dir_s *)dirp; @@ -95,7 +93,7 @@ int closedir(FAR DIR *dirp) * inode we have open. */ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(inode) && !DIRENT_ISPSUEDONODE(idir->fd_flags)) { /* The node is a file system mointpoint. Verify that the mountpoint @@ -145,4 +143,3 @@ errout: return ERROR; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_dup.c b/nuttx/fs/fs_dup.c index efa8f56ba..9149e53aa 100644 --- a/nuttx/fs/fs_dup.c +++ b/nuttx/fs/fs_dup.c @@ -65,8 +65,6 @@ * Global Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int dup(int fildes) { FAR struct filelist *list; @@ -146,4 +144,3 @@ int dup2(int fildes1, int fildes2) return files_dup(&list->fl_files[fildes1], &list->fl_files[fildes2]); } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_fat32.c b/nuttx/fs/fs_fat32.c index 22dd3b237..9d1b273f2 100644 --- a/nuttx/fs/fs_fat32.c +++ b/nuttx/fs/fs_fat32.c @@ -61,9 +61,6 @@ #include "fs_internal.h" #include "fs_fat32.h" -#ifdef CONFIG_FS_FAT -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -2188,5 +2185,3 @@ static int fat_stat(struct inode *mountpt, const char *relpath, struct stat *buf * Public Functions ****************************************************************************/ -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_FS_FAT */ diff --git a/nuttx/fs/fs_fat32attrib.c b/nuttx/fs/fs_fat32attrib.c index 6c7c8c6b3..7537fbf98 100644 --- a/nuttx/fs/fs_fat32attrib.c +++ b/nuttx/fs/fs_fat32attrib.c @@ -51,8 +51,6 @@ #include "fs_internal.h" #include "fs_fat32.h" -#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOUNT) - /************************************************************ * Private Functions ************************************************************/ @@ -190,5 +188,3 @@ int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t clearbits return fat_attrib(path, NULL, setbits, clearbits); } -#endif /* CONFIG_FS_FAT && !CONFIG_DISABLE_MOUNTPOUNT */ - diff --git a/nuttx/fs/fs_fat32util.c b/nuttx/fs/fs_fat32util.c index a21783e01..bf2df78f6 100644 --- a/nuttx/fs/fs_fat32util.c +++ b/nuttx/fs/fs_fat32util.c @@ -58,9 +58,6 @@ #include "fs_internal.h" #include "fs_fat32.h" -#ifdef CONFIG_FS_FAT -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -2445,5 +2442,3 @@ int fat_nfreeclusters(struct fat_mountpt_s *fs, size_t *pfreeclusters) return OK; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_FS_FAT */ diff --git a/nuttx/fs/fs_files.c b/nuttx/fs/fs_files.c index 88f905ef4..8ed7c615e 100644 --- a/nuttx/fs/fs_files.c +++ b/nuttx/fs/fs_files.c @@ -67,8 +67,6 @@ * Private Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS >0 - static void _files_semtake(FAR struct filelist *list) { /* Take the semaphore (perhaps waiting) */ @@ -279,4 +277,3 @@ void files_release(int filedes) } } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_fsync.c b/nuttx/fs/fs_fsync.c index 6aec06daa..403bce280 100644 --- a/nuttx/fs/fs_fsync.c +++ b/nuttx/fs/fs_fsync.c @@ -47,9 +47,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -138,5 +135,3 @@ int fsync(int fd) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOINT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_inode.c b/nuttx/fs/fs_inode.c index 274dcf1a4..73a8601b3 100644 --- a/nuttx/fs/fs_inode.c +++ b/nuttx/fs/fs_inode.c @@ -48,8 +48,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS >0 - /************************************************************ * Definitions ************************************************************/ @@ -330,5 +328,4 @@ const char *inode_nextname(const char *name) if (*name) name++; return name; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_inodefind.c b/nuttx/fs/fs_inodefind.c index 215710311..4f525f83c 100644 --- a/nuttx/fs/fs_inodefind.c +++ b/nuttx/fs/fs_inodefind.c @@ -43,8 +43,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS >0 - /************************************************************ * Definitions ************************************************************/ @@ -97,6 +95,3 @@ FAR struct inode *inode_find(const char *path, const char **relpath) return node; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ - - diff --git a/nuttx/fs/fs_inoderelease.c b/nuttx/fs/fs_inoderelease.c index 360f07298..73ca72603 100644 --- a/nuttx/fs/fs_inoderelease.c +++ b/nuttx/fs/fs_inoderelease.c @@ -44,8 +44,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS >0 - /************************************************************ * Definitions ************************************************************/ @@ -105,4 +103,3 @@ void inode_release(FAR struct inode *node) } } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_inoderemove.c b/nuttx/fs/fs_inoderemove.c index c227cfacc..b1900d498 100644 --- a/nuttx/fs/fs_inoderemove.c +++ b/nuttx/fs/fs_inoderemove.c @@ -119,7 +119,7 @@ STATUS inode_remove(const char *path) /* Find the node to delete */ - node = inode_search(&name, &left, &parent, NULL); + node = inode_search(&name, &left, &parent, (const char **)NULL); if (node) { /* Found it, now remove it from the tree */ diff --git a/nuttx/fs/fs_inodereserve.c b/nuttx/fs/fs_inodereserve.c index 4895cda03..95e08e401 100644 --- a/nuttx/fs/fs_inodereserve.c +++ b/nuttx/fs/fs_inodereserve.c @@ -156,7 +156,7 @@ FAR struct inode *inode_reserve(const char *path) /* Find the location to insert the new subtree */ - if (inode_search(&name, &left, &parent, NULL) != NULL) + if (inode_search(&name, &left, &parent, (const char **)NULL) != NULL) { /* Is is an error if the node already exists in the tree */ diff --git a/nuttx/fs/fs_internal.h b/nuttx/fs/fs_internal.h index 8bfc52f21..79c4ab9d7 100644 --- a/nuttx/fs/fs_internal.h +++ b/nuttx/fs/fs_internal.h @@ -207,11 +207,9 @@ EXTERN void inode_release(FAR struct inode *inode); /* fs_files.c ***************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS >0 EXTERN void weak_function files_initialize(void); EXTERN int files_allocate(FAR struct inode *inode, int oflags, off_t pos); EXTERN void files_release(int filedes); -#endif #undef EXTERN #if defined(__cplusplus) diff --git a/nuttx/fs/fs_ioctl.c b/nuttx/fs/fs_ioctl.c index 8035c4cc4..e40ae25a5 100644 --- a/nuttx/fs/fs_ioctl.c +++ b/nuttx/fs/fs_ioctl.c @@ -52,8 +52,6 @@ * Global Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int ioctl(int fd, int req, unsigned long arg) { FAR struct filelist *list; @@ -87,4 +85,3 @@ int ioctl(int fd, int req, unsigned long arg) return ret; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_mkdir.c b/nuttx/fs/fs_mkdir.c index 4b828e4df..5ac6f845a 100644 --- a/nuttx/fs/fs_mkdir.c +++ b/nuttx/fs/fs_mkdir.c @@ -45,9 +45,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -131,5 +128,3 @@ int mkdir(const char *pathname, mode_t mode) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_mount.c b/nuttx/fs/fs_mount.c index 00b80a574..8a3bd73ae 100644 --- a/nuttx/fs/fs_mount.c +++ b/nuttx/fs/fs_mount.c @@ -45,9 +45,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /* At least one filesystem must be defined, or this file will not compile. * It may be desire-able to make filesystems dynamically registered at * some time in the future, but at present, this file needs to know about @@ -279,6 +276,5 @@ int mount(const char *source, const char *target, return ERROR; } -#endif /* Need at least filesystem */ -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* Need file descriptor support */ +#endif /* Need at least one filesystem */ + diff --git a/nuttx/fs/fs_open.c b/nuttx/fs/fs_open.c index b401aebf7..094710d31 100644 --- a/nuttx/fs/fs_open.c +++ b/nuttx/fs/fs_open.c @@ -56,8 +56,6 @@ * Public Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int inode_checkflags(FAR struct inode *inode, int oflags) { if (((oflags & O_RDOK) != 0 && !inode->u.i_ops->read) || @@ -153,7 +151,7 @@ int open(const char *path, int oflags, ...) ret = OK; if (inode->u.i_ops->open) { -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(inode)) { ret = inode->u.i_mops->open((FAR struct file*)&list->fl_files[fd], @@ -183,4 +181,3 @@ int open(const char *path, int oflags, ...) return ERROR; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_opendir.c b/nuttx/fs/fs_opendir.c index 58a1f4bb2..6890de1ea 100644 --- a/nuttx/fs/fs_opendir.c +++ b/nuttx/fs/fs_opendir.c @@ -82,8 +82,6 @@ * ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - FAR DIR *opendir(const char *path) { FAR struct inode *inode = NULL; @@ -228,4 +226,3 @@ errout_with_semaphore: return NULL; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_read.c b/nuttx/fs/fs_read.c index 1cd291936..5d7ac2c54 100644 --- a/nuttx/fs/fs_read.c +++ b/nuttx/fs/fs_read.c @@ -53,8 +53,6 @@ * Global Functions ****************************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int read(int fd, void *buf, unsigned int nbytes) { FAR struct filelist *list; @@ -99,4 +97,3 @@ int read(int fd, void *buf, unsigned int nbytes) return ret; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_readdir.c b/nuttx/fs/fs_readdir.c index 0c15d04e9..9611aa7da 100644 --- a/nuttx/fs/fs_readdir.c +++ b/nuttx/fs/fs_readdir.c @@ -53,8 +53,6 @@ * Name: readpsuedodir ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - static inline int readpsuedodir(struct internal_dir_s *idir) { FAR struct inode *prev; @@ -228,4 +226,3 @@ errout: return NULL; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_readdirr.c b/nuttx/fs/fs_readdirr.c index 930856041..b08aa06b8 100644 --- a/nuttx/fs/fs_readdirr.c +++ b/nuttx/fs/fs_readdirr.c @@ -82,8 +82,6 @@ * ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int readdir_r(FAR DIR *dirp, FAR struct dirent *entry, FAR struct dirent **result) { @@ -120,4 +118,3 @@ int readdir_r(FAR DIR *dirp, FAR struct dirent *entry, return 0; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_registerblockdriver.c b/nuttx/fs/fs_registerblockdriver.c index 7e6b26157..e48f58dc9 100644 --- a/nuttx/fs/fs_registerblockdriver.c +++ b/nuttx/fs/fs_registerblockdriver.c @@ -43,8 +43,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /************************************************************ * Definitions ************************************************************/ @@ -101,4 +99,3 @@ STATUS register_blockdriver(const char *path, return ret; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ diff --git a/nuttx/fs/fs_rename.c b/nuttx/fs/fs_rename.c index 40c29e80b..d017caf16 100644 --- a/nuttx/fs/fs_rename.c +++ b/nuttx/fs/fs_rename.c @@ -45,9 +45,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -155,5 +152,3 @@ int rename(const char *oldpath, const char *newpath) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_rewinddir.c b/nuttx/fs/fs_rewinddir.c index f276fa5a5..088eb587d 100644 --- a/nuttx/fs/fs_rewinddir.c +++ b/nuttx/fs/fs_rewinddir.c @@ -52,8 +52,6 @@ * Name: rewindpsuedodir ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - static inline void rewindpsuedodir(struct internal_dir_s *idir) { struct inode *prev; @@ -104,7 +102,7 @@ static inline void rewindpsuedodir(struct internal_dir_s *idir) void rewinddir(FAR DIR *dirp) { struct internal_dir_s *idir = (struct internal_dir_s *)dirp; -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT struct inode *inode; #endif @@ -119,7 +117,7 @@ void rewinddir(FAR DIR *dirp) * that we are dealing with. */ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT inode = idir->fd_root; if (INODE_IS_MOUNTPT(inode)) { @@ -143,4 +141,3 @@ void rewinddir(FAR DIR *dirp) } } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_rmdir.c b/nuttx/fs/fs_rmdir.c index 22631957e..5f31ab89a 100644 --- a/nuttx/fs/fs_rmdir.c +++ b/nuttx/fs/fs_rmdir.c @@ -45,9 +45,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -131,5 +128,3 @@ int rmdir(const char *pathname) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_seekdir.c b/nuttx/fs/fs_seekdir.c index 5a4dae6c3..b1a40fa2f 100644 --- a/nuttx/fs/fs_seekdir.c +++ b/nuttx/fs/fs_seekdir.c @@ -48,8 +48,6 @@ * Private Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - /************************************************************ * Name: seekpsuedodir ************************************************************/ @@ -111,7 +109,7 @@ static inline void seekpsuedodir(struct internal_dir_s *idir, off_t offset) * Name: seekmountptdir ************************************************************/ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT static inline void seekmountptdir(struct internal_dir_s *idir, off_t offset) { struct inode *inode; @@ -212,7 +210,7 @@ void seekdir(FAR DIR *dirp, off_t offset) * that we are dealing with. */ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(idir->fd_root)) { /* The node is a file system mointpoint */ @@ -228,4 +226,3 @@ void seekdir(FAR DIR *dirp, off_t offset) } } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_stat.c b/nuttx/fs/fs_stat.c index ac72658ba..f0b85d911 100644 --- a/nuttx/fs/fs_stat.c +++ b/nuttx/fs/fs_stat.c @@ -53,8 +53,6 @@ * Private Functions ****************************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - /**************************************************************************** * Name: statpsuedo ****************************************************************************/ @@ -161,7 +159,7 @@ int stat(const char *path, FAR struct stat *buf) * are dealing with. */ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(inode)) { /* The node is a file system mointpoint. Verify that the mountpoint @@ -205,4 +203,3 @@ int stat(const char *path, FAR struct stat *buf) return ERROR; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_statfs.c b/nuttx/fs/fs_statfs.c index 515723ed6..fbafe0bf5 100644 --- a/nuttx/fs/fs_statfs.c +++ b/nuttx/fs/fs_statfs.c @@ -54,8 +54,6 @@ * Private Functions ****************************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - /**************************************************************************** * Name: statpsuedo ****************************************************************************/ @@ -125,7 +123,7 @@ int statfs(const char *path, struct statfs *buf) * are dealing with. */ -#ifndef CONFIG_DISABLE_MOUNTPOUNT +#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(inode)) { /* The node is a file system mointpoint. Verify that the mountpoint @@ -168,5 +166,3 @@ int statfs(const char *path, struct statfs *buf) *get_errno_ptr() = ret; return ERROR; } - -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_telldir.c b/nuttx/fs/fs_telldir.c index dc886ba24..ebcef94c6 100644 --- a/nuttx/fs/fs_telldir.c +++ b/nuttx/fs/fs_telldir.c @@ -72,8 +72,6 @@ * ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - off_t telldir(FAR DIR *dirp) { struct internal_dir_s *idir = (struct internal_dir_s *)dirp; @@ -89,4 +87,3 @@ off_t telldir(FAR DIR *dirp) return idir->fd_position; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_umount.c b/nuttx/fs/fs_umount.c index d6a6351f4..1cb6a1d2b 100644 --- a/nuttx/fs/fs_umount.c +++ b/nuttx/fs/fs_umount.c @@ -44,9 +44,6 @@ #include <nuttx/fs.h> #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -206,5 +203,3 @@ int umount(const char *target) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_unlink.c b/nuttx/fs/fs_unlink.c index 2c7386b19..a3a689411 100644 --- a/nuttx/fs/fs_unlink.c +++ b/nuttx/fs/fs_unlink.c @@ -45,9 +45,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -131,5 +128,3 @@ int unlink(const char *pathname) return ERROR; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_unregisterblockdriver.c b/nuttx/fs/fs_unregisterblockdriver.c index cae8d931c..094e90d2e 100644 --- a/nuttx/fs/fs_unregisterblockdriver.c +++ b/nuttx/fs/fs_unregisterblockdriver.c @@ -43,9 +43,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 -#ifndef CONFIG_DISABLE_MOUNTPOUNT - /**************************************************************************** * Definitions ****************************************************************************/ @@ -83,5 +80,3 @@ STATUS unregister_blockdriver(const char *path) return ret; } -#endif /* CONFIG_DISABLE_MOUNTPOUNT */ -#endif diff --git a/nuttx/fs/fs_unregisterdriver.c b/nuttx/fs/fs_unregisterdriver.c index 1e13e598f..e43a2b594 100644 --- a/nuttx/fs/fs_unregisterdriver.c +++ b/nuttx/fs/fs_unregisterdriver.c @@ -43,8 +43,6 @@ #include "fs_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 - /**************************************************************************** * Definitions ****************************************************************************/ @@ -82,4 +80,3 @@ STATUS unregister_driver(const char *path) return ret; } -#endif diff --git a/nuttx/fs/fs_write.c b/nuttx/fs/fs_write.c index cebb49e60..60a6b8290 100644 --- a/nuttx/fs/fs_write.c +++ b/nuttx/fs/fs_write.c @@ -53,8 +53,6 @@ * Global Functions ************************************************************/ -#if CONFIG_NFILE_DESCRIPTORS > 0 - int write(int fd, const void *buf, unsigned int nbytes) { FAR struct filelist *list; @@ -94,5 +92,3 @@ int write(int fd, const void *buf, unsigned int nbytes) return ret; } -#endif /* CONFIG_NFILE_DESCRIPTORS */ - |