blob: b29d97bbd4f9e2202d65f3cbf48e6696747f0595 (
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
|
--- src/sj-util.c.orig Tue Feb 8 14:06:57 2005
+++ src/sj-util.c Tue Feb 8 14:25:03 2005
@@ -157,6 +157,15 @@
if (fd < 0) {
return FALSE;
}
+#if defined(__FreeBSD__)
+ status = FALSE;
+
+ ioctl (fd, CDIOCCLOSE);
+
+ close (fd);
+
+ return status;
+#else
status = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
if (status < 0) {
@@ -167,6 +176,7 @@
close (fd);
return status == CDS_TRAY_OPEN;
+#endif
}
gboolean is_audio_cd (const char *device)
@@ -191,7 +201,7 @@
default:
return FALSE;
}
-
+/*
fd = open (device, O_RDONLY | O_NONBLOCK | O_EXCL);
if (fd <0) {
return FALSE;
@@ -206,6 +216,7 @@
close (fd);
return status == CDS_AUDIO;
+ */
}
/* Pass NULL to use g_free */
|