static void movePages(struct BattFsSuper *disk, pgcnt_t src, int offset)
{
pgcnt_t dst = src + offset;
- memmove(&disk->page_array[dst], &disk->page_array[src], disk->page_count - MAX(dst, src) * sizeof(pgcnt_t));
+ memmove(&disk->page_array[dst], &disk->page_array[src], (disk->page_count - MAX(dst, src)) * sizeof(pgcnt_t));
if (offset < 0)
{
return true;
}
+/**
+ * Close \a disk.
+ */
+bool battfs_close(struct BattFsSuper *disk)
+{
+ return disk->close(disk);
+}
+
bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode, seq_t seq, fill_t fill, pgoff_t pgoff, mark_t mark)
{
BattFsPageHeader hdr;
- TRACEMSG("page %d, inode %d, pgoff %d\n", page, inode, pgoff);
hdr.inode = inode;
hdr.seq = seq;
} BattFsSuper;
bool battfs_init(struct BattFsSuper *d);
+bool battfs_close(struct BattFsSuper *disk);
+
bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode, seq_t seq, fill_t fill, pgoff_t pgoff, mark_t mark);
#endif /* FS_BATTFS_H */