1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/fatfs: ensure volume is initialized before formatting

This commit is contained in:
Benjamin Valentin 2022-02-22 15:13:22 +01:00
parent 93cd0bcc57
commit 2aa41b1a44

View File

@ -87,6 +87,11 @@ static int _format(vfs_mount_t *mountp)
}
#endif
/* make sure the volume has been initialized */
if (_init(mountp)) {
return -EINVAL;
}
const MKFS_PARM param = {
.fmt = CONFIG_FATFS_FORMAT_TYPE,
};