ports/57226: audio/cdparanoia fix to work with cooked_ioctl under -CURRENT
Vladimir Kushnir
vkushnir at Alfacom.net
Thu Sep 25 23:00:43 UTC 2003
>Number: 57226
>Category: ports
>Synopsis: audio/cdparanoia fix to work with cooked_ioctl under -CURRENT
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 25 16:00:38 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Vladimir Kushnir
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD kushnir1.kiev.ua 5.1-CURRENT FreeBSD 5.1-CURRENT #11: Tue Sep 23 12:56:27 EEST 2003 root at kushnir1.kiev.ua:/usr/obj/usr/src/sys/KUSHNIR i386
>Description:
Under FreeBSD-CURRENT, cdparanoia does not work with cooked_ioctls
interface because both CDIOCREADAUDIO ioctl and /dev/acd?c were
removed.
>How-To-Repeat:
Run "cdparanoia -d /dev/acd0c ..." or "cdparanoia -d /dev/acd0 ..."
(if CD-ROM is acd0)
>Fix:
i) replace "/dev{cd,acd,mcd,wcd}?c" by "/dev/{cd,acd,mcd,wcd}?" in
ports/audio/cdparanoia/files/patch-interface-scan_devices.c, and
ii) apply the patch below _after_ "make patch" was done in port.
NB: This patch is for -CURRENT
--- patch-interface::cooked_interface.c.1 begins here ---
*** work/cdparanoia-III-alpha9.8/interface/cooked_interface.c Wed Sep 24 02:04:02 2003
--- interface/cooked_interface.c Wed Sep 24 02:05:04 2003
***************
*** 201,218 ****
cooked_read(cdrom_drive *d, void *p, long begin, long sectors)
{
int retry_count = 0;
! struct ioc_read_audio arg;
!
! if (sectors > d->nsectors)
! sectors = d->nsectors;
!
! arg.address_format = CD_LBA_FORMAT;
! arg.address.lba = begin;
! arg.buffer = p;
for (;;) {
! arg.nframes = sectors;
! if (ioctl(d->ioctl_fd, CDIOCREADAUDIO, &arg) == -1) {
if (!d->error_retry)
return -7;
--- 201,213 ----
cooked_read(cdrom_drive *d, void *p, long begin, long sectors)
{
int retry_count = 0;
! int bsize = CD_FRAMESIZE_RAW;
for (;;) {
! if (ioctl(d->ioctl_fd, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
! return -7;
! }
! if (pread(d->ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) {
if (!d->error_retry)
return -7;
--- patch-interface::cooked_interface.c.1 ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list