jcs
/wifi_da
/amendments
/37
scsi: Don't warn() for anything, the user doesn't care
jcs made amendment 37 15 days ago
--- scsi.c Wed Sep 25 15:12:15 2024
+++ scsi.c Tue Jan 7 12:23:04 2025
@@ -238,18 +238,18 @@ scsi_io(unsigned short scsi_id, unsigned char *cdb, un
short ret, ioret;
if (SCSIGet() != noErr) {
- warn("SCSIGet failed");
+ logger_printf("scsi[%d]: SCSIGet failed", scsi_id);
return -1;
}
if (SCSISelect(scsi_id) != noErr) {
- warn("SCSISelect failed");
+ logger_printf("scsi[%d]: SCSISelect failed", scsi_id);
return -1;
}
if (SCSICmd((Ptr)cdb, cdb_len) != noErr) {
SCSIComplete(&scsi_stat, &scsi_msg, 300);
- warn("SCSICmd failed");
+ logger_printf("scsi[%d]: SCSICmd failed", scsi_id);
return -1;
}
@@ -288,15 +288,17 @@ scsi_io(unsigned short scsi_id, unsigned char *cdb, un
/* complete and free the bus before responding to the read/write */
if (SCSIComplete(&scsi_stat, &scsi_msg, 300 /* 1/60 ticks */) != noErr) {
- logger_printf("SCSIComplete failed");
+ logger_printf("scsi[%d]: SCSIComplete failed", scsi_id);
return -1;
}
if (ioret != noErr && ioret != scPhaseErr)
- logger_printf("SCSIRead/Write failed: %d", ioret);
+ logger_printf("scsi[%d]: SCSIRead/Write failed: %d", scsi_id,
+ ioret);
if (scsi_stat != noErr)
- logger_printf("SCSIComplete bad status: %d", scsi_stat);
+ logger_printf("scsi[%d]: SCSIComplete bad status: %d", scsi_id,
+ scsi_stat);
return len;
}