1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-13 23:36:08 +00:00
freebsd-ports/graphics/hpscan/files/patch-af
Justin M. Seger 65cf9d05d7 Unbreak for current.
Submitted by:	sprice
1998-10-12 04:25:34 +00:00

59 lines
1.6 KiB
Plaintext

--- scsi.c.orig Fri Jun 3 07:26:15 1994
+++ scsi.c Sun Oct 11 21:44:37 1998
@@ -31,19 +31,23 @@
return req->status;
}
-ScsiStatus scsi_test_unit_ready(int fd, ScsiSense *sense)
+ScsiStatus Scsi_test_unit_ready(int fd, ScsiSense *sense)
{
static scsireq_t req;
struct scsi_test_unit_ready *cmd = (struct scsi_test_unit_ready *)&req.cmd;
+#if __FreeBSD__ < 3
cmd->op_code= TEST_UNIT_READY;
+#else
+ cmd->opcode = TEST_UNIT_READY;
+#endif
req.cmdlen = sizeof(*cmd);
return scsi_do_command(fd, &req, sense);
}
-ScsiStatus scsi_inquiry(int fd, ScsiSense *sense, ScsiInquiry *inquiry)
+ScsiStatus Scsi_inquiry(int fd, ScsiSense *sense, ScsiInquiry *inquiry)
{
static scsireq_t req;
struct scsi_inquiry *cmd = (struct scsi_inquiry *)&req.cmd;
@@ -51,7 +55,11 @@
*inquiry = &buf;
+#if __FreeBSD__ < 3
cmd->op_code = INQUIRY;
+#else
+ cmd->opcode = INQUIRY;
+#endif
cmd->length = sizeof(buf);
req.cmdlen = sizeof(*cmd);
req.databuf = (u_char *)&buf;
@@ -71,7 +79,7 @@
u_char unused;
};
-ScsiStatus scsi_send(int fd, ScsiSense *sense, u_char *data, int *len)
+ScsiStatus Scsi_send(int fd, ScsiSense *sense, u_char *data, int *len)
{
static scsireq_t req;
struct scsi_send_receive *cmd = (struct scsi_send_receive *)&req.cmd;
@@ -96,7 +104,7 @@
return status;
}
-ScsiStatus scsi_receive(int fd, ScsiSense *sense, u_char *data, int *len)
+ScsiStatus Scsi_receive(int fd, ScsiSense *sense, u_char *data, int *len)
{
static scsireq_t req;
struct scsi_send_receive *cmd = (struct scsi_send_receive *)&req.cmd;