Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
8aa8a0a6
Commit
8aa8a0a6
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
extmod/vfs_fat: Use SECSIZE macro to determine FatFs sector size.
parent
3f6b4e08
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
extmod/vfs_fat.c
+7
-1
7 additions, 1 deletion
extmod/vfs_fat.c
with
7 additions
and
1 deletion
extmod/vfs_fat.c
+
7
−
1
View file @
8aa8a0a6
...
@@ -45,6 +45,12 @@
...
@@ -45,6 +45,12 @@
#include
"extmod/fsusermount.h"
#include
"extmod/fsusermount.h"
#include
"timeutils.h"
#include
"timeutils.h"
#if _MAX_SS == _MIN_SS
#define SECSIZE(fs) (_MIN_SS)
#else
#define SECSIZE(fs) ((fs)->ssize)
#endif
#define mp_obj_fat_vfs_t fs_user_mount_t
#define mp_obj_fat_vfs_t fs_user_mount_t
STATIC
mp_obj_t
fat_vfs_make_new
(
const
mp_obj_type_t
*
type
,
size_t
n_args
,
size_t
n_kw
,
const
mp_obj_t
*
args
)
{
STATIC
mp_obj_t
fat_vfs_make_new
(
const
mp_obj_type_t
*
type
,
size_t
n_args
,
size_t
n_kw
,
const
mp_obj_t
*
args
)
{
...
@@ -267,7 +273,7 @@ STATIC mp_obj_t fat_vfs_statvfs(mp_obj_t vfs_in, mp_obj_t path_in) {
...
@@ -267,7 +273,7 @@ STATIC mp_obj_t fat_vfs_statvfs(mp_obj_t vfs_in, mp_obj_t path_in) {
mp_obj_tuple_t
*
t
=
MP_OBJ_TO_PTR
(
mp_obj_new_tuple
(
10
,
NULL
));
mp_obj_tuple_t
*
t
=
MP_OBJ_TO_PTR
(
mp_obj_new_tuple
(
10
,
NULL
));
t
->
items
[
0
]
=
MP_OBJ_NEW_SMALL_INT
(
fatfs
->
csize
*
fatfs
->
ssize
);
// f_bsize
t
->
items
[
0
]
=
MP_OBJ_NEW_SMALL_INT
(
fatfs
->
csize
*
SECSIZE
(
fatfs
)
);
// f_bsize
t
->
items
[
1
]
=
t
->
items
[
0
];
// f_frsize
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
)
*
fatfs
->
csize
);
// f_blocks
t
->
items
[
3
]
=
MP_OBJ_NEW_SMALL_INT
(
nclst
);
// f_bfree
t
->
items
[
3
]
=
MP_OBJ_NEW_SMALL_INT
(
nclst
);
// f_bfree
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment