X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Fbattfs.h;h=ec03da223727cd5c9deab8be739667c9f57c2016;hb=ac4ffd37dc8234b555bf2f540bd09210febdd11b;hp=5dace1393cb73aa1fbc73b51735f6d399f8dce90;hpb=330e739c66975353f97071ff31d67d62127dd2eb;p=bertos.git diff --git a/bertos/fs/battfs.h b/bertos/fs/battfs.h index 5dace139..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 BattFsKFile +typedef struct BattFS { KFile fd; ///< KFile context Node link; ///< Link for inserting in opened file list @@ -236,7 +236,7 @@ typedef struct BattFsKFile BattFsSuper *disk; ///< Disk context filemode_t mode; ///< File open mode pgcnt_t *start; ///< Pointer to page_array file start position. -} BattFsKFile; +} BattFS; /** * Id for battfs file descriptors. @@ -244,20 +244,20 @@ typedef struct BattFsKFile #define KFT_BATTFS MAKE_ID('B', 'T', 'F', 'S') /** - * Macro used to cast a KFile to a BattFsKFile. + * Macro used to cast a KFile to a BattFS. * Also perform dynamic type check. */ -INLINE BattFsKFile * BattFsKFile(KFile *fd) +INLINE BattFS * BATTFSKFILE(KFile *fd) { ASSERT(fd->_type == KFT_BATTFS); - return (BattFsKFile *)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, BattFsKFile *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);