From f7816188b701552036c9f3f2c6d1eb06462087d1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 29 Mar 2017 12:53:35 +1100 Subject: [PATCH] extmod/vfs_fat: Fix calculation of total blocks in statvfs. --- extmod/vfs_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/vfs_fat.c b/extmod/vfs_fat.c index 8cd5a4674a..dee4f92988 100644 --- a/extmod/vfs_fat.c +++ b/extmod/vfs_fat.c @@ -268,7 +268,7 @@ STATIC mp_obj_t fat_vfs_statvfs(mp_obj_t vfs_in, mp_obj_t path_in) { t->items[0] = MP_OBJ_NEW_SMALL_INT(fatfs->csize * SECSIZE(fatfs)); // f_bsize t->items[1] = t->items[0]; // f_frsize - t->items[2] = MP_OBJ_NEW_SMALL_INT((fatfs->n_fatent - 2) * fatfs->csize); // f_blocks + t->items[2] = MP_OBJ_NEW_SMALL_INT((fatfs->n_fatent - 2)); // f_blocks t->items[3] = MP_OBJ_NEW_SMALL_INT(nclst); // f_bfree t->items[4] = t->items[3]; // f_bavail t->items[5] = MP_OBJ_NEW_SMALL_INT(0); // f_files