diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-10 19:29:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-10 19:29:24 +0000 |
commit | bae76fc0b070b5d47d35a44c6a91692957029cf8 (patch) | |
tree | eb3c0fa04693ffd428c362bb714b1fcbe824e08c /nuttx/fs/fs_internal.h | |
parent | 9dcf38806dd69fade9cdeb1ad0a7b0fce7f72e77 (diff) | |
download | px4-nuttx-bae76fc0b070b5d47d35a44c6a91692957029cf8.tar.gz px4-nuttx-bae76fc0b070b5d47d35a44c6a91692957029cf8.tar.bz2 px4-nuttx-bae76fc0b070b5d47d35a44c6a91692957029cf8.zip |
ROMFS filesystem support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@903 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_internal.h')
-rw-r--r-- | nuttx/fs/fs_internal.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/nuttx/fs/fs_internal.h b/nuttx/fs/fs_internal.h index c09716943..3ebf3f210 100644 --- a/nuttx/fs/fs_internal.h +++ b/nuttx/fs/fs_internal.h @@ -94,19 +94,34 @@ struct fs_psuedodir_s struct inode *fd_next; /* The inode for the next call to readdir() */ }; -#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT) -/* For fat, we need to retun the start cluster, current cluster, current +#ifndef CONFIG_DISABLE_MOUNTPOINT +#ifdef CONFIG_FS_FAT +/* For fat, we need to return the start cluster, current cluster, current * sector and current directory index. */ struct fs_fatdir_s { - uint32 fd_startcluster; /* Start cluster number of the directory*/ - uint32 fd_currcluster; /* Current cluster number being read*/ - size_t fd_currsector; /* Current sector being read*/ + uint32 fd_startcluster; /* Start cluster number of the directory */ + uint32 fd_currcluster; /* Current cluster number being read */ + size_t fd_currsector; /* Current sector being read */ unsigned int fd_index; /* Current index of the directory entry to read */ }; -#endif +#endif /* CONFIG_FS_FAT */ + +#ifdef CONFIG_FS_ROMFS +/* For ROMFS, we need to return the offset to the current and start positions + * of the directory entry being read + */ + +struct fs_romfsdir_s +{ + uint32 fr_diroffset; /* Offset to the directory entry */ + uint32 fr_firstoffset; /* Offset to the first entry */ + uint32 fr_curroffset; /* Current offset into the directory contents */ +}; +#endif /* CONFIG_FS_ROMFS */ +#endif /* CONFIG_DISABLE_MOUNTPOINT */ struct internal_dir_s { @@ -148,6 +163,9 @@ struct internal_dir_s #ifdef CONFIG_FS_FAT struct fs_fatdir_s fat; #endif +#ifdef CONFIG_FS_ROMFS + struct fs_romfsdir_s romfs; +#endif #endif } u; |