summaryrefslogtreecommitdiff
path: root/graphics/hpscan/files/patch-af
blob: 9af351349a89fa25382f332ad9395c7699581228 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- 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;