Skip to content

Commit

Permalink
Windows version : Print mass storage read/write error code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Jul 25, 2018
1 parent dc33754 commit a715081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdl/sdl_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a715081

Please sign in to comment.