diff --git a/core/cfs/cfs-coffee.c b/core/cfs/cfs-coffee.c index a14a55571..4b837fc13 100644 --- a/core/cfs/cfs-coffee.c +++ b/core/cfs/cfs-coffee.c @@ -1132,13 +1132,12 @@ cfs_write(int fd, const void *buf, unsigned size) int cfs_opendir(struct cfs_dir *dir, const char *name) { - /* We have only a root directory. */ - if((name[0] == '/' || name[0] == '.') && name[1] == '\0') { + /* + * Coffee is only guaranteed to support "/" and ".", but it does not + * currently enforce this. + */ *(coffee_page_t *)dir->dummy_space = 0; - return 0; - } - - return -1; + return 0; } /*---------------------------------------------------------------------------*/ int diff --git a/core/cfs/cfs.h b/core/cfs/cfs.h index 49c52900d..34e024975 100644 --- a/core/cfs/cfs.h +++ b/core/cfs/cfs.h @@ -54,7 +54,7 @@ * * Author: Adam Dunkels * - * $Id: cfs.h,v 1.15 2009/02/28 11:39:02 oliverschmidt Exp $ + * $Id: cfs.h,v 1.16 2009/02/28 13:40:25 nvt-se Exp $ */ #ifndef __CFS_H__ #define __CFS_H__ @@ -221,10 +221,9 @@ CCIF int cfs_write(int fd, const void *buf, unsigned int len); * determined by the combination of the offset parameter * and the whence parameter. * - * If whence is CFS_SEEK_SET, the current position is set - * to the offset value. CFS_SEEK_CUR moves the position - * forward the number of bytes specified by offset. CFS_SEEK - * end moves the position offset bytes past the end of the file. + * \sa CFS_SEEK_CUR + * \sa CFS_SEEK_END + * \sa CFS_SEEK_SET */ #ifndef cfs_seek CCIF cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence);