Skip to content

Commit

Permalink
initiator: no reason to try to image a drive that is too big for fat3…
Browse files Browse the repository at this point in the history
…2, would waste 30 min of a users time to get the error.
  • Loading branch information
erichelgeson authored and androda committed Oct 12, 2023
1 parent 90ad09e commit 8e9a3c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/BlueSCSI_initiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ void scsiInitiatorMainLoop()
{
// Note: the FAT32 limit is 4 GiB - 1 byte
log("Image files equal or larger than 4 GiB are only possible on exFAT filesystem");
log("Please reformat the SD card with exFAT format to image this drive fully");

g_initiator_state.sectorcount = (uint32_t)0xFFFFFFFF / g_initiator_state.sectorsize;
log("Will image first 4 GiB - 1 = ", (int)g_initiator_state.sectorcount, " sectors");
log("Please reformat the SD card with exFAT format to image this drive.");
g_initiator_state.sectorsize = 0;
g_initiator_state.sectorcount = g_initiator_state.sectorcount_all = 0;
}
}
else if (startstopok)
Expand Down

0 comments on commit 8e9a3c0

Please sign in to comment.