/** * \file * * * \author Francesco Sacchi * * \brief KBlock interface on POSIX file. * * \author Francesco Sacchi * * $WIZ$ module_name = "kfile_posix" * $WIZ$ module_depends = "kblock" */ #ifndef KBLOCK_POSIX_H #define KBLOCK_POSIX_H #include "kblock.h" #include typedef struct KBlockPosix { KBlock b; FILE *fp; } KBlockPosix; #define KBT_KBLOCKPOSIX MAKE_ID('K', 'B', 'F', 'L') INLINE KBlockPosix *KBLOCKPOSIX_CAST(KBlock *b) { ASSERT(b->priv.type == KBT_KBLOCKPOSIX); return (KBlockPosix *)b; } void kblockposix_init(KBlockPosix *f, FILE *fp, bool hwbuf, void *buf, size_t block_size, block_idx_t block_count); #endif /* KBLOCK_POSIX_H */