summaryrefslogtreecommitdiff
path: root/sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2004-06-02 17:05:44 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2004-06-02 17:05:44 +0000
commit6cb0e39750b6e85f10d1f8f0af7f87eaf2ff3c4a (patch)
treecb0f351f1e68e11ef28a52532bd00072077b861a /sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c
parentUpdate to 8.0.066.p067.1. (diff)
- Update to 2.01a30. For a list of changes please see:
ftp://ftp.berlios.de/pub/cdrecord/alpha/AN-2.01a30 - Add a workaround for the problem that cdda2wav doesn't use a page aligned buffer for the SCSI transfers in paranoia mode. [1] - Merge sysutils/mkisofs-devel into sysutils/cdrtools-devel as done with the corresponding non-devel ports. PR: 63775 [1] Submitted by: marius
Notes
Notes: svn path=/head/; revision=110677
Diffstat (limited to 'sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c')
-rw-r--r--sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c b/sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c
index ba5d9bfba731..0e0f7f7c46ab 100644
--- a/sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c
+++ b/sysutils/cdrtools-devel/files/patch-cdda2wav::interface.c
@@ -17,7 +17,33 @@
if (!S_ISCHR(statstruct->st_mode)) {
fprintf(stderr, "%s is not a char device\n",pdev_name);
exit(SYNTAX_ERROR);
-@@ -593,9 +601,6 @@
+@@ -555,8 +563,25 @@
+ }
+ dontneedgroup();
+ dontneedroot();
++#if defined (__FreeBSD__)
++ /*
++ * i_read_c_block(), used by paranoia_read_limited() for reading the
++ * data from the CD, doesn't use a page aligned buffer as required by
++ * FreeBSD for SCSI transfers (well, most OS do). Probably this should
++ * be dealt with in cdda_read() (called by i_read_c_block() with the
++ * unaligned buffer and in turn calls ReadCdRom() to do the actual read)
++ * but it seems like overkill to add yet another buffer (would make it
++ * 3 or so from do_read() to ReadCdRom() alone). Instead, limit the
++ * transfer size via the maximum for the sectors to read at once to a
++ * value that lets the data fit into a page (for FreeBSD the code below
++ * would set the maximum sectors to 27).
++ */
++ if (global.nsectors > 26)
++ global.nsectors = 26;
++#else
+ if (global.nsectors > (unsigned) scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW)
+ global.nsectors = scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW;
++#endif
+ if (global.overlap >= global.nsectors)
+ global.overlap = global.nsectors-1;
+
+@@ -593,9 +618,6 @@
exit(RACE_ERROR);
}
#endif
@@ -27,7 +53,7 @@
}
return retval;
}
-@@ -888,6 +893,7 @@
+@@ -888,6 +910,7 @@
FatalError("No memory for SCSI structure.\n");
}
scgp->silent = 0;