Skip to content

Commit

Permalink
Fix typo and reduce verbosity in log
Browse files Browse the repository at this point in the history
Fix a type in the magneto-optical drive filename extension. Moved some
log  messages to debug messages for a cleaner experience.
  • Loading branch information
morio committed Feb 16, 2024
1 parent 57210a6 commit bd82694
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/ZuluSCSI_initiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void scsiInitiatorMainLoop()
else if (g_initiator_state.device_type == SCSI_DEVICE_TYPE_MO)
{
strncpy(filename_base, "MO00_imaged", sizeof(filename_base));
filename_extension = ".ing";
filename_extension = ".img";
}
else if (g_initiator_state.device_type != SCSI_DEVICE_TYPE_DIRECT_ACCESS)
{
Expand Down Expand Up @@ -671,7 +671,7 @@ bool scsiRequestSense(int target_id, uint8_t *sense_key)
response, sizeof(response),
NULL, 0);

logmsg("RequestSense response: ", bytearray(response, 18));
dbgmsg("RequestSense response: ", bytearray(response, 18));

*sense_key = response[2] % 0xF;
return status == 0;
Expand All @@ -692,7 +692,7 @@ bool scsiStartStopUnit(int target_id, bool start)
{
if(g_initiator_state.eject_when_done)
{
logmsg("Ejecting media");
logmsg("Ejecting media on SCSI ID: ", target_id);
g_initiator_state.removable_count[g_initiator_state.target_id]++;
command[4] = 0b00000010; // eject(6), stop(7).
}
Expand All @@ -707,7 +707,7 @@ bool scsiStartStopUnit(int target_id, bool start)
{
uint8_t sense_key;
scsiRequestSense(target_id, &sense_key);
logmsg("START STOP UNIT on target ", target_id, " failed, sense key ", sense_key);
dbgmsg("START STOP UNIT on target ", target_id, " failed, sense key ", sense_key);
}

return status == 0;
Expand Down Expand Up @@ -752,18 +752,18 @@ bool scsiTestUnitReady(int target_id)
if (sense_key == 6)
{
uint8_t inquiry[36];
logmsg("Target ", target_id, " reports UNIT_ATTENTION, running INQUIRY");
dbgmsg("Target ", target_id, " reports UNIT_ATTENTION, running INQUIRY");
scsiInquiry(target_id, inquiry);
}
else if (sense_key == 2)
{
logmsg("Target ", target_id, " reports NOT_READY, running STARTSTOPUNIT");
dbgmsg("Target ", target_id, " reports NOT_READY, running STARTSTOPUNIT");
scsiStartStopUnit(target_id, true);
}
}
else
{
logmsg("Target ", target_id, " TEST UNIT READY response: ", status);
dbgmsg("Target ", target_id, " TEST UNIT READY response: ", status);
}
}

Expand Down

0 comments on commit bd82694

Please sign in to comment.