From a71508142206dc4c6c147e7902a51a777e5da243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20DEL=20NERO?= Date: Wed, 25 Jul 2018 22:17:08 +0200 Subject: [PATCH] Windows version : Print mass storage read/write error code. --- sdl/sdl_hal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdl/sdl_hal.c b/sdl/sdl_hal.c index 00c18b6..6d43e39 100644 --- a/sdl/sdl_hal.c +++ b/sdl/sdl_hal.c @@ -195,6 +195,8 @@ int write_mass_storage(unsigned long lba, unsigned char * data) return ERR_NO_ERROR; } + printf("WriteFile : Error 0x%.8X\n",GetLastError()); + if(locked) DeviceIoControl(hMassStorage,(DWORD) FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, &dwNotUsed, NULL); } @@ -235,6 +237,8 @@ int read_mass_storage(unsigned long lba, unsigned char * data, int nbsector) { return ERR_NO_ERROR; } + + printf("ReadFile : Error 0x%.8X\n",GetLastError()); } #else