Browse Source

initiator: target_file is never read from, open write only.

Eric Helgeson 1 year ago
parent
commit
b4cf5b7bc9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/BlueSCSI_initiator.cpp

+ 1 - 1
src/BlueSCSI_initiator.cpp

@@ -251,7 +251,7 @@ void scsiInitiatorMainLoop()
                 {
                     log("Using filename: ", filename, " to avoid overwriting existing file.");
                 }
-                g_initiator_state.target_file = SD.open(filename, O_RDWR | O_CREAT | O_TRUNC);
+                g_initiator_state.target_file = SD.open(filename, O_WRONLY | O_CREAT | O_TRUNC);
                 if (!g_initiator_state.target_file.isOpen())
                 {
                     log("Failed to open file for writing: ", filename);