[PATCH] Improve SCSI Driver logging

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


---
 src/nf_scsidrv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/nf_scsidrv.c b/src/nf_scsidrv.c
index f4be29bf..b8aecead 100644
--- a/src/nf_scsidrv.c
+++ b/src/nf_scsidrv.c
@@ -407,6 +407,12 @@ static int scsidrv_inout(uint32_t stack)
 
 		status = ioctl(handle_meta_data[handle].fd,
 		               SG_IO, &io_hdr) < 0 ? -1 : io_hdr.status;
+
+		if(status == -1)
+		{
+			Log_Printf(LOG_ERROR, "\nCan't transfer %d byte(s)\n", transfer_len);
+		}
+
 		if (!status && sense_buffer && sense_buffer[2] & 0x0f)
 		{
 			status = sense_buffer[2] & 0x0f;
-- 
2.45.2


--CEKGnb34lvl8u1YC--



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/