X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Fbattfs.c;h=6253af88b8f37a875dca6bd11a5c4ecfb55e044a;hb=82697da95a4f826ecd42451e0ccb8902e2fbb96f;hp=423319063abd9747b7256d1e5742ae0dd2da6cbe;hpb=bbedb371fb03dd99af14fb82b7d3cb22839dc7b8;p=bertos.git diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index 42331906..6253af88 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -246,11 +246,10 @@ static bool countDiskFilePages(struct BattFsSuper *disk, pgoff_t *filelen_table) * inside file. * e.g. : at page array[0] you will find page address of the first page * of the first file (if present). - * Free blocks are allocated after the last file, starting from invalid ones - * and continuing with the marked free ones. + * Free blocks are allocated after the last file. * * \return true if ok, false on disk read errors. - * \note The whole disk is scanned once. + * \note The whole disk is scanned at max twice. */ static bool fillPageArray(struct BattFsSuper *disk, pgoff_t *filelen_table) { @@ -608,6 +607,7 @@ bool battfs_close(struct BattFsSuper *disk) return disk->close(disk) && (res == 0); } +#if UNIT_TEST bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode, seq_t seq, fill_t fill, pgoff_t pgoff) { BattFsPageHeader hdr; @@ -626,3 +626,4 @@ bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode return true; } +#endif