Disk size is computed by driver.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 5 Feb 2008 12:52:39 +0000 (12:52 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 5 Feb 2008 12:52:39 +0000 (12:52 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1090 38d2e660-2303-0410-9eaa-f027e97ec537

app/battfs/battfs_test.c

index a0b8e348a2fd73db56d3b5732a5d8b589a94ec49..b949d0742e39f8402a62b31c49c8eed24ede8735 100644 (file)
@@ -56,7 +56,6 @@ static bool disk_open(struct BattFsSuper *d)
        fseek(fp, 0, SEEK_END);
        d->page_size = PAGE_SIZE;
        d->page_count = ftell(fp) / d->page_size;
-       d->disk_size = d->page_size * d->page_count;
        d->page_array = malloc(d->page_count * sizeof(pgcnt_t));
        TRACEMSG("page_size:%d, page_count:%d, disk_size:%d\n", d->page_size, d->page_count, d->disk_size);
        return (fp && d->page_array);