Skip to content

Commit

Permalink
SD library: Fix format (#9034)
Browse files Browse the repository at this point in the history
Pass correct work buffer size to f_mkfs
  • Loading branch information
prplz authored Dec 28, 2023
1 parent 4d469c8 commit b2e7338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/SD/src/sd_diskio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format
}
//FRESULT f_mkfs (const TCHAR* path, const MKFS_PARM* opt, void* work, UINT len);
const MKFS_PARM opt = {(BYTE)FM_ANY, 0, 0, 0, 0};
res = f_mkfs(drv, &opt, work, sizeof(work));
res = f_mkfs(drv, &opt, work, sizeof(BYTE) * FF_MAX_SS);
free(work);
if (res != FR_OK) {
log_e("f_mkfs failed: %s", fferr2str[res]);
Expand Down

0 comments on commit b2e7338

Please sign in to comment.