summaryrefslogtreecommitdiff
path: root/audio/grip
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>2000-09-05 01:33:44 +0000
committerSteve Price <steve@FreeBSD.org>2000-09-05 01:33:44 +0000
commit378999b03ede3a4f8fcad856ed22cc950320d533 (patch)
treece3eb75670200b9c73b04d0914f7bf823bae4234 /audio/grip
parentUpdate to version 0.7.4. (diff)
Avoids bus errors by closing and re-initializing the device before we
try to re-open it. PR: 20979 Submitted by: Orion Hodson <O.Hodson@cs.ucl.ac.uk>
Notes
Notes: svn path=/head/; revision=32272
Diffstat (limited to 'audio/grip')
-rw-r--r--audio/grip/files/patch-ab10
-rw-r--r--audio/grip/files/patch-ac14
-rw-r--r--audio/grip/files/patch-ad15
3 files changed, 39 insertions, 0 deletions
diff --git a/audio/grip/files/patch-ab b/audio/grip/files/patch-ab
new file mode 100644
index 000000000000..468dd44d029f
--- /dev/null
+++ b/audio/grip/files/patch-ab
@@ -0,0 +1,10 @@
+--- grip.h.orig Tue Apr 18 10:37:44 2000
++++ grip.h Mon Sep 4 17:59:26 2000
+@@ -257,6 +257,7 @@
+ /* Low-level cd control routines -- found in cd.c */
+
+ int CDInitDevice(char *device_name);
++void CDCloseDevice(int cd_desc);
+ int CDStat(int cd_desc,struct disc_info *disc,gboolean read_toc);
+ int CDPlayFrames(int cd_desc,int startframe,int endframe);
+ int CDPlayTrackPos(int cd_desc,struct disc_info *disc,int starttrack,
diff --git a/audio/grip/files/patch-ac b/audio/grip/files/patch-ac
new file mode 100644
index 000000000000..454fef3fd7e1
--- /dev/null
+++ b/audio/grip/files/patch-ac
@@ -0,0 +1,14 @@
+--- cd.c.orig Tue Apr 18 10:37:44 2000
++++ cd.c Mon Sep 4 17:59:26 2000
+@@ -98,6 +98,11 @@
+ return cd_desc;
+ }
+
++void CDCloseDevice(int cd_desc)
++{
++ close(cd_desc);
++}
++
+ /* Update a CD status structure... because operating system interfaces vary
+ so does this function. */
+
diff --git a/audio/grip/files/patch-ad b/audio/grip/files/patch-ad
new file mode 100644
index 000000000000..1f8e5382abbf
--- /dev/null
+++ b/audio/grip/files/patch-ad
@@ -0,0 +1,15 @@
+--- grip.c.orig Tue Apr 18 10:37:44 2000
++++ grip.c Mon Sep 4 17:59:26 2000
+@@ -1279,6 +1279,12 @@
+ CDStat(cd_desc,&info,FALSE);
+
+ if(info.disc_present) {
++ /* FreeBSD CD ioctl CDIOREADTOCHEADER fails when old disk is ejected
++ * and a new disk one entered. Re-opening device fixes this.
++ */
++ CDCloseDevice(cd_desc);
++ cd_desc = CDInitDevice(cddevice);
++
+ CDStat(cd_desc,&info,TRUE);
+
+ Debug("CDStat found a disc, checking tracks\n");