27 lines
954 B
Plaintext
27 lines
954 B
Plaintext
|
--- tosha.c.orig Sat Jan 2 00:57:49 1999
|
||
|
+++ tosha.c Mon Aug 23 08:44:51 1999
|
||
|
@@ -578,6 +578,7 @@
|
||
|
int i;
|
||
|
|
||
|
char *vendor, *product, *versid;
|
||
|
+ int atapi;
|
||
|
char *ofname; /* output file name */
|
||
|
int index;
|
||
|
int singlefile = FALSE;
|
||
|
@@ -634,10 +635,12 @@
|
||
|
vendor = justify(strndup((char *) buf + 8, 8));
|
||
|
product = justify(strndup((char *) buf + 16, 16));
|
||
|
versid = justify(strndup((char *) buf + 32, 4));
|
||
|
+ /* SID_ANSII field is 0 on ATAPI devices. XXX get SID_ANSII define? */
|
||
|
+ atapi = (buf[2] & 7) == 0;
|
||
|
if (!quiet)
|
||
|
- fprintf (stderr, "Device: %s -- \"%s\" \"%s\" \"%s\"\n",
|
||
|
- device, vendor, product, versid);
|
||
|
- devconfig = toconf_searchentry(vendor, product, versid);
|
||
|
+ fprintf (stderr, "%s device: %s -- \"%s\" \"%s\" \"%s\"\n",
|
||
|
+ atapi ? "ATAPI" : "SCSI", device, vendor, product, versid);
|
||
|
+ devconfig = toconf_searchentry(vendor, product, versid, atapi);
|
||
|
if (sectorsperbuf <= 0)
|
||
|
sectorsperbuf = devconfig->blocks;
|
||
|
else
|