From 9b45c6171e04b1d312e1c221e0a575b9180157b0 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 14 Dec 2007 08:07:04 +0000 Subject: [PATCH] Pastos. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1037 38d2e660-2303-0410-9eaa-f027e97ec537 --- fs/battfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/battfs.c b/fs/battfs.c index 0a01ee3c..8d02d94f 100644 --- a/fs/battfs.c +++ b/fs/battfs.c @@ -319,7 +319,7 @@ bool battfs_init(struct BattFsSuper *disk) { BattFsPageHeader hdr_old; - if (!battfs_readHeader(disk, page, &hdr_old)) + if (!battfs_readHeader(disk, disk->page_array[array_pos], &hdr_old)) return false; #ifdef _DEBUG @@ -359,7 +359,7 @@ bool battfs_init(struct BattFsSuper *disk) disk->page_array[array_pos] = new_page; /* Add free space */ - disk->free_bytes -= disk->page_size - sizeof(BattFsPageHeader) - old_fill; + disk->free_bytes += old_fill; /* Shift all array one position to the left, overwriting duplicate page */ array_pos -= hdr.pgoff; -- 2.25.1