Re: [hatari-devel] SCSI Driver logging improvement |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 28/11/2024 à 16:52, Uwe Seimet a écrit :
Hi,
this patch adds better logging to the SCSI Driver. Can you please apply it?
Best regards
Uwe
hi
unless I'm misreading it your patch seems to do the opposite of current code
- status = ioctl(handle_meta_data[handle].fd,
- SG_IO, &io_hdr) < 0 ? -1 : io_hdr.status;
+ status = 0;
+ if (ioctl(handle_meta_data[handle].fd, SG_IO, &io_hdr) == -1)
+ {
+ Log_Printf(LOG_ERROR, "\nCan't transfer %d byte(s)\n", transfer_len);
+ status = io_hdr.status;
+ }
+
-> is sets status=io_hdr.status when ioctl fails and leaves if to 0 when
it succeeds.