X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Fbattfs.h;h=ec03da223727cd5c9deab8be739667c9f57c2016;hb=5052c1fc4ec98aee492d449e853febc1a2b09d40;hp=59d8fece34fe164b470996e19ef7778cb3b6cb54;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/fs/battfs.h b/bertos/fs/battfs.h index 59d8fece..ec03da22 100644 --- a/bertos/fs/battfs.h +++ b/bertos/fs/battfs.h @@ -228,7 +228,7 @@ typedef uint32_t file_size_t; ///< Type for file sizes. /** * Describe a BattFs file usign a KFile. */ -typedef struct KFileBattFs +typedef struct BattFS { KFile fd; ///< KFile context Node link; ///< Link for inserting in opened file list @@ -236,7 +236,7 @@ typedef struct KFileBattFs BattFsSuper *disk; ///< Disk context filemode_t mode; ///< File open mode pgcnt_t *start; ///< Pointer to page_array file start position. -} KFileBattFs; +} BattFS; /** * Id for battfs file descriptors. @@ -244,20 +244,20 @@ typedef struct KFileBattFs #define KFT_BATTFS MAKE_ID('B', 'T', 'F', 'S') /** - * Macro used to cast a KFile to a KFileBattFs. + * Macro used to cast a KFile to a BattFS. * Also perform dynamic type check. */ -INLINE KFileBattFs * KFILEBATTFS(KFile *fd) +INLINE BattFS * BATTFSKFILE(KFile *fd) { ASSERT(fd->_type == KFT_BATTFS); - return (KFileBattFs *)fd; + return (BattFS *)fd; } bool battfs_init(struct BattFsSuper *d); bool battfs_close(struct BattFsSuper *disk); bool battfs_fileExists(BattFsSuper *disk, inode_t inode); -bool battfs_fileopen(BattFsSuper *disk, KFileBattFs *fd, inode_t inode, filemode_t mode); +bool battfs_fileopen(BattFsSuper *disk, BattFS *fd, inode_t inode, filemode_t mode); bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode, seq_t seq, fill_t fill, pgoff_t pgoff, mark_t mark);