Skip to content

Commit bc07c93

Browse files
committed
Read filename in one chunk in Toolbox onSendFilePrep
This appears to do something to make bus timings compatible with some Adaptec host adapters.
1 parent a684366 commit bc07c93

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/BlueSCSI_Toolbox.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,12 @@ void onGetFile10(char * dir_name) {
251251
void onSendFilePrep(char * dir_name)
252252
{
253253
char file_name[32+1];
254-
memset(file_name, '\0', 32+1);
254+
255255
scsiEnterPhase(DATA_OUT);
256-
for (int i = 0; i < 32+1; ++i)
257-
{
258-
file_name[i] = scsiReadByte();
259-
}
256+
scsiRead(static_cast<uint8_t *>(static_cast<void *>(file_name)), 32+1, NULL);
257+
file_name[32] = '\0';
258+
259+
debuglog("TOOLBOX OPEN FILE FOR WRITE: '", file_name, "'");
260260
SD.chdir(dir_name);
261261
gFile.open(file_name, FILE_WRITE);
262262
SD.chdir("/");

0 commit comments

Comments
 (0)