Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b89ac9db
Commit
b89ac9db
authored
Oct 05, 2016
by
Damien George
Browse files
stmhal/moduos: Implement total-number-of-blocks field in statvfs.
parent
b1537a57
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/moduos.c
View file @
b89ac9db
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment