From 06b89c57c5c6be8934ca2958ade0519585bf6849 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 14 Feb 2020 15:25:02 +0100 Subject: [PATCH] core/sdcard: return proper disk status flags to fatfs --- core/embed/extmod/modtrezorio/modtrezorio-fatfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/embed/extmod/modtrezorio/modtrezorio-fatfs.h b/core/embed/extmod/modtrezorio/modtrezorio-fatfs.h index 811397f8f6..4d2e8745bc 100644 --- a/core/embed/extmod/modtrezorio/modtrezorio-fatfs.h +++ b/core/embed/extmod/modtrezorio/modtrezorio-fatfs.h @@ -28,11 +28,11 @@ // clang-format on DSTATUS disk_initialize(BYTE pdrv) { - return (sectrue == sdcard_is_present()) ? 0 : STA_NODISK; + return disk_status(pdrv); } DSTATUS disk_status(BYTE pdrv) { - return (sectrue == sdcard_is_present()) ? 0 : STA_NODISK; + return (sectrue == sdcard_is_present()) ? 0 : (STA_NOINIT | STA_NODISK); } DRESULT disk_read(BYTE pdrv, BYTE *buff, LBA_t sector, UINT count) {