7a443d201f
- /etc -> SYSCONFDIR - add proper INSTALL/DEINSTALL scripts - rename and regen patches - misc clean-ups
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
$OpenBSD: patch-tosha_c,v 1.1 2001/03/14 15:04:12 naddy Exp $
|
|
--- tosha.c.orig Sat Jan 2 00:57:49 1999
|
|
+++ tosha.c Wed Mar 14 15:23:38 2001
|
|
@@ -578,6 +578,7 @@ main (int argc, char *argv[])
|
|
int i;
|
|
|
|
char *vendor, *product, *versid;
|
|
+ int atapi;
|
|
char *ofname; /* output file name */
|
|
int index;
|
|
int singlefile = FALSE;
|
|
@@ -634,10 +635,12 @@ main (int argc, char *argv[])
|
|
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
|