From c2bc43ced9d30a3f6d70680e3a33ad4db272701d Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 16 Mar 2007 22:03:58 +0000 Subject: Fix SDCC compilation problems git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@72 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/fs/fs_inode.c | 6 ++++++ nuttx/fs/fs_inodefind.c | 6 ++++++ nuttx/fs/fs_inodefinddir.c | 4 ++++ nuttx/fs/fs_inoderelease.c | 6 +++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/nuttx/fs/fs_inode.c b/nuttx/fs/fs_inode.c index 10936c8be..9c7cf3d07 100644 --- a/nuttx/fs/fs_inode.c +++ b/nuttx/fs/fs_inode.c @@ -48,6 +48,8 @@ #include #include "fs_internal.h" +#if CONFIG_NFILE_DESCRIPTORS >0 + /************************************************************ * Definitions ************************************************************/ @@ -106,9 +108,11 @@ static int _inode_compare(const char *fname, } /* At end of find name?*/ + else if (!*fname || *fname == '/') { /* Yes... return find name < node name */ + return -1; } @@ -318,3 +322,5 @@ 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 8edd19f08..0df0b2ad5 100644 --- a/nuttx/fs/fs_inodefind.c +++ b/nuttx/fs/fs_inodefind.c @@ -43,6 +43,8 @@ #include #include "fs_internal.h" +#if CONFIG_NFILE_DESCRIPTORS >0 + /************************************************************ * Definitions ************************************************************/ @@ -94,3 +96,7 @@ FAR struct inode *inode_find(const char *path) inode_semgive(); return node; } + +#endif /* CONFIG_NFILE_DESCRIPTORS */ + + diff --git a/nuttx/fs/fs_inodefinddir.c b/nuttx/fs/fs_inodefinddir.c index bb27dd7b4..044021598 100644 --- a/nuttx/fs/fs_inodefinddir.c +++ b/nuttx/fs/fs_inodefinddir.c @@ -43,6 +43,8 @@ #include #include "fs_internal.h" +#if CONFIG_NFILE_DESCRIPTORS >0 + /************************************************************ * Definitions ************************************************************/ @@ -122,3 +124,5 @@ FAR struct inode *inode_finddir(const char *path) inode_semgive(); return child; } + +#endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/nuttx/fs/fs_inoderelease.c b/nuttx/fs/fs_inoderelease.c index 3989a4959..15dc49ae6 100644 --- a/nuttx/fs/fs_inoderelease.c +++ b/nuttx/fs/fs_inoderelease.c @@ -43,6 +43,8 @@ #include #include "fs_internal.h" +#if CONFIG_NFILE_DESCRIPTORS >0 + /************************************************************ * Definitions ************************************************************/ @@ -100,4 +102,6 @@ void inode_release(FAR struct inode *node) inode_semgive(); } } -} \ No newline at end of file +} + +#endif /* CONFIG_NFILE_DESCRIPTORS */ -- cgit v1.2.3