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
|
--- lineak/cdromctrl.cpp.orig Thu Oct 28 17:04:06 2004
+++ lineak/cdromctrl.cpp Sat Jan 15 11:28:04 2005
@@ -26,6 +26,12 @@
# define CDROMEJECT CDIOCEJECT /*_IO('c', 107)*/
# define CDROMCLOSETRAY CDIOCCLOSE
#else
+# include <sys/mount.h>
+
+# include <scsi/scsi.h>
+# include <scsi/sg.h>
+# include <scsi/scsi_ioctl.h>
+
# include <linux/version.h>
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,70)
typedef unsigned char u8;
@@ -37,16 +43,11 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/mount.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
-#include <scsi/scsi.h>
-#include <scsi/sg.h>
-#include <scsi/scsi_ioctl.h>
-
}
#include <iostream>
@@ -141,6 +142,9 @@
}
/** OPen the tray for a scsi device */
void cdromCtrl::openTrayScsi(){
+ #if defined (__FreeBSD__)
+ cdromCtrl::openTray();
+ #else
/* do we have a CD-ROM device configured? (extra check, not really nescessary) */
if ( cdromdev != snull && initialized) {
lineak_core_functions::msg("... ejecting the SCSI CD-ROM tray");
@@ -196,6 +200,7 @@
status = ioctl(fp, BLKRRPART);
// return (status == 0);
}
+#endif
}
/** Set or disable the auto-eject mode. If auto-eject mode is enabled, the cdrom device
will eject when we issue a close(fp); */
|