Skip to content

Commit b2e7338

Browse files
authored
SD library: Fix format (#9034)
Pass correct work buffer size to f_mkfs
1 parent 4d469c8 commit b2e7338

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/SD/src/sd_diskio.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format
818818
}
819819
//FRESULT f_mkfs (const TCHAR* path, const MKFS_PARM* opt, void* work, UINT len);
820820
const MKFS_PARM opt = {(BYTE)FM_ANY, 0, 0, 0, 0};
821-
res = f_mkfs(drv, &opt, work, sizeof(work));
821+
res = f_mkfs(drv, &opt, work, sizeof(BYTE) * FF_MAX_SS);
822822
free(work);
823823
if (res != FR_OK) {
824824
log_e("f_mkfs failed: %s", fferr2str[res]);

0 commit comments

Comments
 (0)