|
Lines 1-41
Link Here
|
| 1 |
--- iodev/cdrom.cc Sat Dec 14 21:29:42 2002 |
|
|
| 2 |
+++ iodev/cdrom.cc Fri Jan 3 13:21:31 2003 |
| 3 |
@@ -101,6 +101,8 @@ |
| 4 |
#include <sys/cdio.h> |
| 5 |
#include <sys/ioctl.h> |
| 6 |
#include <sys/disklabel.h> |
| 7 |
+// ntohl(x) et al have been moved out of sys/param.h in FreeBSD 5 |
| 8 |
+#include <netinet/in.h> |
| 9 |
|
| 10 |
// XXX |
| 11 |
#define BX_CD_FRAMESIZE 2048 |
| 12 |
@@ -881,7 +883,7 @@ |
| 13 |
t.data_len = sizeof(tocentry); |
| 14 |
t.data = &tocentry; |
| 15 |
|
| 16 |
- if (ioctl (fd, CDIOREADTOCENTRYS, &tocentry) < 0) |
| 17 |
+ if (ioctl (fd, CDIOREADTOCENTRYS, &t) < 0) |
| 18 |
BX_PANIC(("cdrom: read_toc: READTOCENTRY failed.")); |
| 19 |
|
| 20 |
buf[len++] = 0; // Reserved |
| 21 |
@@ -910,7 +912,7 @@ |
| 22 |
t.data_len = sizeof(tocentry); |
| 23 |
t.data = &tocentry; |
| 24 |
|
| 25 |
- if (ioctl (fd, CDIOREADTOCENTRYS, &tocentry) < 0) |
| 26 |
+ if (ioctl (fd, CDIOREADTOCENTRYS, &t) < 0) |
| 27 |
BX_PANIC(("cdrom: read_toc: READTOCENTRY lead-out failed.")); |
| 28 |
|
| 29 |
buf[len++] = 0; // Reserved |
| 30 |
@@ -1123,9 +1125,8 @@ |
| 31 |
} |
| 32 |
#elif defined(__FreeBSD__) |
| 33 |
{ |
| 34 |
- // Read the TOC to get the data size, since disklabel doesn't appear |
| 35 |
- // to work, sadly. |
| 36 |
- // Keith Jones, 16 January 2000 |
| 37 |
+ // Read the TOC to get the size of the data track. |
| 38 |
+ // Keith Jones <freebsd.dev@blueyonder.co.uk>, 16 January 2000 |
| 39 |
|
| 40 |
#define MAX_TRACKS 100 |
| 41 |
|