[xiph-commits] r11809 - trunk/cdparanoia/interface
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Tue Aug 29 14:32:57 PDT 2006
Author: xiphmont
Date: 2006-08-29 14:32:56 -0700 (Tue, 29 Aug 2006)
New Revision: 11809
Modified:
trunk/cdparanoia/interface/scsi_interface.c
Log:
Eliminate some out-of-band used in debugging that wasn't part of the normal error reporting mechanism.
Modified: trunk/cdparanoia/interface/scsi_interface.c
===================================================================
--- trunk/cdparanoia/interface/scsi_interface.c 2006-08-29 21:29:03 UTC (rev 11808)
+++ trunk/cdparanoia/interface/scsi_interface.c 2006-08-29 21:32:56 UTC (rev 11809)
@@ -300,31 +300,6 @@
return(0);
}
-static void print_cmd_error(cdrom_drive *d, char *direction, unsigned char *cmdp, int cmdlen) {
- char ebuf[1024];
- unsigned char tmp[2];
- int x=0;
-
- sprintf(ebuf, "\nError %s command: ", direction);
- cdmessage(d, ebuf);
- tmp[1] = 0;
- while (x < cmdlen) {
- if (x % 8 == 0)
- cdmessage(d, " ");
- if (x % 16 == 0) {
- cdmessage(d, "\n");
- if (x+1 < cmdlen)
- cdmessage(d, "\t");
- }
- tmp[0] = cmdp[x];
- sprintf(ebuf, "%02x ", tmp[0]);
- cdmessage(d, ebuf);
- x++;
- }
- if (!(x % 16 == 0))
- cdmessage(d, "\n");
-}
-
static int sgio_handle_scsi_cmd(cdrom_drive *d,
unsigned char *cmd,
unsigned int cmd_len,
@@ -362,10 +337,7 @@
status = ioctl(d->ioctl_fd, SG_IO, &hdr);
if (status >= 0 && hdr.status)
status = check_sbp_error(hdr.sbp);
- if (status < 0) {
- print_cmd_error(d, "writing", hdr.cmdp, cmd_len);
- return TR_EWRITE;
- }
+ if (status < 0) return TR_EWRITE;
}
if (!in_size | out_size) {
@@ -380,10 +352,7 @@
status = ioctl(d->ioctl_fd, SG_IO, &hdr);
if (status >= 0 && hdr.status)
status = check_sbp_error(hdr.sbp);
- if (status < 0) {
- print_cmd_error(d, "reading", hdr.cmdp, cmd_len);
- return TR_EREAD;
- }
+ if (status < 0) return TR_EREAD;
}
/* Failed/Partial DMA transfers occasionally get through. Why? No clue,
More information about the commits
mailing list