> Hmmm... I am writing/debugging a YAFFS interface layer to get it known as an > eCos filesystem. Did you also do that? Is there a way that we can share code > and/or work? Our intention is to fully feed the NAND Flash layer and YAFFS2 > filesystem interface to eCos. I don't see why we could not :-) The back end (NAND vs. SPI flash) is different, but this is not relevant for the eCos "VFS" API - I mean the triplet (filesystem op, file op, directory op) functions (see below) I have virtually no time to work on this implementation right now, but it does not mean I could not post the code somewhere, for sure. Cheers, Manu The eCos API for YAFFS2: // --- Filesystem operations --- static int yaffs2_fs_mount(cyg_fstab_entry * fste, cyg_mtab_entry * mte); static int yaffs2_fs_umount(cyg_mtab_entry * mte); static int yaffs2_fs_open(cyg_mtab_entry * mte, cyg_dir dir, const char * path, int oflag, cyg_file * file); static int yaffs2_fs_unlink(cyg_mtab_entry * mte, cyg_dir dir, const char * path); static int yaffs2_fs_mkdir(cyg_mtab_entry * mte, cyg_dir dir, const char * path); static int yaffs2_fs_rmdir(cyg_mtab_entry * mte, cyg_dir dir, const char * path); static int yaffs2_fs_rename(cyg_mtab_entry * mte, cyg_dir sdir, const char * spath, cyg_dir ddir, const char * dpath); static int yaffs2_fs_link(cyg_mtab_entry * mte, cyg_dir sdir, const char * spath, cyg_dir ddir, const char * dpath, int type); static int yaffs2_fs_opendir(cyg_mtab_entry * mte, cyg_dir dir, const char * path, cyg_file * fte); static int yaffs2_fs_chdir(cyg_mtab_entry * mte, cyg_dir dir, const char * path, cyg_dir * dir_out); static int yaffs2_fs_stat(cyg_mtab_entry * mte, cyg_dir dir, const char * name, struct stat * buf); static int yaffs2_fs_getinfo(cyg_mtab_entry * mte, cyg_dir dir, const char * path, int key, void * buf, int len); static int yaffs2_fs_setinfo(cyg_mtab_entry * mte, cyg_dir dir, const char * path, int key, void * buf, int len); // --- File operations --- static int yaffs2_fo_read(struct CYG_FILE_TAG * fp, struct CYG_UIO_TAG * uio); static int yaffs2_fo_write(struct CYG_FILE_TAG * fp, struct CYG_UIO_TAG * uio); static int yaffs2_fo_lseek(struct CYG_FILE_TAG * fp, off_t * pos, int whence); static int yaffs2_fo_ioctl(struct CYG_FILE_TAG * fp, CYG_ADDRWORD com, CYG_ADDRWORD data); static int yaffs2_fo_fsync(struct CYG_FILE_TAG * fp, int mode); static int yaffs2_fo_close(struct CYG_FILE_TAG * fp); static int yaffs2_fo_fstat(struct CYG_FILE_TAG * fp, struct stat * buf); static int yaffs2_fo_getinfo(struct CYG_FILE_TAG * fp, int key, void * buf, int len); static int yaffs2_fo_setinfo(struct CYG_FILE_TAG * fp, int key, void * buf, int len); // --- Directory operations --- static int yaffs2_fo_readdir(struct CYG_FILE_TAG * fp, struct CYG_UIO_TAG * uio); static int yaffs2_fo_seekdir(struct CYG_FILE_TAG * fp, off_t * pos, int whence); static int yaffs2_fo_closedir(struct CYG_FILE_TAG * fp); // --- Helpers --- static yaffs_Object * yaffs2_lookup_dir(yaffs_Object * start, const char * path, const char ** name, int symdepth); static yaffs_Object * yaffs2_lookup_object(yaffs_Object * reldir, const char * path, int symdepth); static yaffs_Object * yaffs2_follow_link(yaffs_Object *obj, int symdepth); static int yaffs2_fs_pathconf(struct cyg_pathconf_info * info); #ifdef CYGSEM_FILEIO_INFO_DISK_USAGE static int yaffs2_fs_disk_usage(cyg_mtab_entry * mte, struct cyg_fs_disk_usage * disk_usage); #endif // CYGSEM_FILEIO_INFO_DISK_USAGE -- Manu