diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-05 15:52:36 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-05 15:52:36 +1100 |
commit | b89ac9db78def244fca8a38636709a14ff39dcd9 (patch) | |
tree | 21bfb5029c9ed08e82d76c1108b9707bed495326 /stmhal/moduos.c | |
parent | b1537a575289d19431f67906bb43befdde7a26a2 (diff) | |
download | micropython-b89ac9db78def244fca8a38636709a14ff39dcd9.tar.gz micropython-b89ac9db78def244fca8a38636709a14ff39dcd9.zip |
stmhal/moduos: Implement total-number-of-blocks field in statvfs.
Diffstat (limited to 'stmhal/moduos.c')
-rw-r--r-- | stmhal/moduos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/moduos.c b/stmhal/moduos.c index 0a369ef380..c6afc22103 100644 --- a/stmhal/moduos.c +++ b/stmhal/moduos.c @@ -307,7 +307,7 @@ STATIC mp_obj_t os_statvfs(mp_obj_t path_in) { t->items[0] = MP_OBJ_NEW_SMALL_INT(fatfs->csize * 512); // f_bsize - block size t->items[1] = t->items[0]; // f_frsize - fragment size - t->items[2] = MP_OBJ_NEW_SMALL_INT(0); // f_blocks - total number of blocks + t->items[2] = MP_OBJ_NEW_SMALL_INT((fatfs->n_fatent - 2) * fatfs->csize); // f_blocks - total number of blocks t->items[3] = MP_OBJ_NEW_SMALL_INT(nclst); // f_bfree - number of free blocks t->items[4] = t->items[3]; // f_bavail - free blocks avail to unpriviledged users t->items[5] = MP_OBJ_NEW_SMALL_INT(0); // f_files - # inodes |