Lines 1-15
Link Here
|
1 |
--- cdrombsd.h.orig Sat Aug 18 15:09:10 2001 |
1 |
--- cdrombsd.h.orig Sat Aug 18 14:09:10 2001 |
2 |
+++ cdrombsd.h Thu Nov 20 19:24:05 2003 |
2 |
+++ cdrombsd.h Thu Mar 4 09:55:32 2004 |
3 |
@@ -5,15 +5,19 @@ |
3 |
@@ -5,15 +5,17 @@ |
4 |
#ifndef CDROMBSD_H |
4 |
#ifndef CDROMBSD_H |
5 |
#define CDROMBSD_H |
5 |
#define CDROMBSD_H |
6 |
#include <sys/param.h> |
6 |
#include <sys/param.h> |
7 |
+#if __FreeBSD_version >= 501106 |
|
|
8 |
+#include <sys/cdrio.h> |
7 |
+#include <sys/cdrio.h> |
9 |
+#ifndef CD_FRAMESIZE_RAW |
8 |
+#ifndef CD_FRAMESIZE_RAW |
10 |
+#define CD_FRAMESIZE_RAW 2352 |
9 |
+#define CD_FRAMESIZE_RAW 2352 |
11 |
+#endif |
10 |
+#endif |
12 |
+#endif |
|
|
13 |
/*\ |
11 |
/*\ |
14 |
|*| FreeBSD (?) specific code |
12 |
|*| FreeBSD (?) specific code |
15 |
\*/ |
13 |
\*/ |
Lines 25-31
Link Here
|
25 |
|
23 |
|
26 |
|
24 |
|
27 |
/*\ |
25 |
/*\ |
28 |
@@ -84,6 +88,16 @@ |
26 |
@@ -26,16 +28,14 @@ |
|
|
27 |
int fd; |
28 |
fd = open(device, O_RDONLY|O_NONBLOCK); |
29 |
if (fd < 0) return -1; |
30 |
-#ifdef CDROM_SELECT_SPEED |
31 |
if (!(*flags & FLAG_FAIL_SPD) && |
32 |
- (ioctl(fd, CDROM_SELECT_SPEED, cd_cfg.cdrom_speed) < 0)) { |
33 |
+ (ioctl(fd, CDRIOCREADSPEED, &cd_cfg.cdrom_speed) < 0)) { |
34 |
if (errno == ENOTTY) { |
35 |
close(fd); |
36 |
return -1; |
37 |
} |
38 |
*flags |= FLAG_FAIL_SPD; |
39 |
} |
40 |
-#endif |
41 |
return fd; |
42 |
} |
43 |
|
44 |
@@ -84,6 +84,16 @@ |
29 |
|*| from device cdfd, at position lba |
45 |
|*| from device cdfd, at position lba |
30 |
|*| Return number of successfully read frames, -1 on error. |
46 |
|*| Return number of successfully read frames, -1 on error. |
31 |
\*/ |
47 |
\*/ |
Lines 42-48
Link Here
|
42 |
static int |
58 |
static int |
43 |
cdrom_read_audio(int cdfd, int lba, char *buf, int btw) |
59 |
cdrom_read_audio(int cdfd, int lba, char *buf, int btw) |
44 |
{ |
60 |
{ |
45 |
@@ -101,6 +115,7 @@ |
61 |
@@ -101,6 +111,7 @@ |
46 |
} while (--rtr >= 0); |
62 |
} while (--rtr >= 0); |
47 |
return -1; |
63 |
return -1; |
48 |
} |
64 |
} |