Re: Fix for WINE on -CURRENT
Hello! On Wed, Nov 05, 2003 at 05:50:35AM +0100, Simon Barner wrote: can you make a patch for cdparanoia as well? cdparanoia is also broken on recent -CURRENT and testing will be easy. There is already a PR. I will rewise my patch to use __FreeBSD__ in the patch file instead of using ${EXTRA_PATCHES}. do you mean __FreeBSD_version? http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/57226 please revise the patch and submit follow-up. This one here should be closed IMHO since there is a cleaner solution that backing out the change. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/58461 /fjoe ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
please revise the patch and submit follow-up. Done. Tested on both -STABLE and -CURRENT. I am progress of doing the same for dagrab (expect a follow-up to PR 57227 soon). Simon signature.asc Description: Digital signature
Re: PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
Hello! On Wed, Nov 05, 2003 at 02:10:02PM +0100, Simon Barner wrote: please revise the patch and submit follow-up. Done. Tested on both -STABLE and -CURRENT. I am progress of doing the same for dagrab (expect a follow-up to PR 57227 soon). There is no need for extra-patches. #ifdef CDIOCREADAUDIO seems to be sufficient enough. Is using CDRIOCSETBLOCKSIZE necessary as well? If yes it shouold be done in enable_cdda callback I think. Moreover, is there a reason we should use CDIOCREADAUDIO on RELENG_4? Please test attached patch. works for me on RELENG_4 and should work on -CURRENT as well. /fjoe Index: Makefile === RCS file: /home/pcvs/ports/audio/cdparanoia/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- Makefile14 Jul 2003 02:52:55 - 1.8 +++ Makefile5 Nov 2003 14:05:27 - @@ -7,7 +7,7 @@ PORTNAME= cdparanoia PORTVERSION= 3.9.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES=audio sysutils MASTER_SITES= http://www.xiph.org/paranoia/download/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/^3\./III-alpha/} Index: files/patch-interface-cooked_interface.c === RCS file: /home/pcvs/ports/audio/cdparanoia/files/patch-interface-cooked_interface.c,v retrieving revision 1.2 diff -u -p -r1.2 patch-interface-cooked_interface.c --- files/patch-interface-cooked_interface.c11 Jan 2003 09:15:00 - 1.2 +++ files/patch-interface-cooked_interface.c5 Nov 2003 14:38:09 - @@ -1,11 +1,5 @@ -Index: interface/cooked_interface.c -=== -RCS file: /home/cvs/cdparanoia/interface/cooked_interface.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.8 -diff -u -r1.1.1.1 -r1.8 interface/cooked_interface.c 2003/01/05 09:46:26 1.1.1.1 -+++ interface/cooked_interface.c 2003/01/11 08:58:45 1.8 +--- interface/cooked_interface.c.orig Thu Apr 20 05:41:04 2000 interface/cooked_interface.c Wed Nov 5 20:37:44 2003 @@ -1,6 +1,8 @@ /** * CopyPolicy: GNU Public License 2 applies @@ -23,7 +17,7 @@ diff -u -r1.1.1.1 -r1.8 static int cooked_readtoc (cdrom_drive *d){ int i; int tracks; -@@ -129,6 +132,128 @@ +@@ -129,6 +132,120 @@ return(sectors); } @@ -96,18 +90,10 @@ diff -u -r1.1.1.1 -r1.8 +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; ++ int bsize = CD_FRAMESIZE_RAW; + + for (;;) { -+ arg.nframes = sectors; -+ if (ioctl(d-ioctl_fd, CDIOCREADAUDIO, arg) == -1) { ++ if (pread(d-ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) { + if (!d-error_retry) + return -7; + @@ -152,7 +138,7 @@ diff -u -r1.1.1.1 -r1.8 /* hook */ static int Dummy (cdrom_drive *d,int Switch){ return(0); -@@ -193,6 +318,7 @@ +@@ -193,6 +310,7 @@ int cooked_init_drive (cdrom_drive *d){ int ret; @@ -160,7 +146,7 @@ diff -u -r1.1.1.1 -r1.8 switch(d-drive_type){ case MATSUSHITA_CDROM_MAJOR:/* sbpcd 1 */ case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */ -@@ -243,6 +369,9 @@ +@@ -243,6 +361,9 @@ default: d-nsectors=40; } ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Fix for WINE on -CURRENT
On Mon, 3 Nov 2003, Scot W. Hetzel wrote: Below is a patch to fix WINE for the new ATA driver. Thanks! (I kind of fixed it temporarily by removing the offending code, but clearly your approach is preferrable.) Could someone familar with the new ATA driver have a look at this patch to make sure it is correct. Once we have some positive confirmation, would you mind submitting a slightly adjusted version (against Wine CVS, that is, basically on top of my current patch in FreeBSD CVS, not instead that = the patch to [EMAIL PROTECTED] (Cc:ing) me)? Just, do we really need to check for the FreeBSD version? I had understood that simply reading from the device should work on 4.x, old 5.x, and -CURRENT. Søren, Kris? Gerald -- Gerald Pfeifer (Jerry) [EMAIL PROTECTED] http://www.pfeifer.com/gerald/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
I am progress of doing the same for dagrab (expect a follow-up to PR 57227 soon). There is no need for extra-patches. #ifdef CDIOCREADAUDIO seems to be sufficient enough. The version in GNATs is obsoleted, but my update did not make it there, although it appeared in freebsd-ports-bugs@ (I used the follow-up email-link in the GNATs web interface). I will prepare and test a version that used pread() like yours this night. It will be here then: http://home.leo.org/~barner/freebsd/dagrab-pread.patch Is using CDRIOCSETBLOCKSIZE necessary as well? If yes it shouold be done in enable_cdda callback I think. I don't now. I don't know how to interpret Soren's comments in http://freebsd.rambler.ru/bsdmail/freebsd-current_2003/msg15989.html regarding our situation: The right way of doing audio graps has been to set the wanted blocksize with CDRIOCSETBLOCKSIZE (not needed if all tracks on the CD is of the same size), then just read from the device. Ioctl's was newer meant to be used to read/write data, its also faster to use the R/W path... Can we assue that all tracks on an audio CD are of the same (block) size? What about those mixed-mode CDs (sorry, I don't know the specifications). Moreover, is there a reason we should use CDIOCREADAUDIO on RELENG_4? Please test attached patch. works for me on RELENG_4 and should work on -CURRENT as well. Yep, it works fine for me on 4.9-STABLE and 5.1-CURRENT (and complies with Soren's posting). I think the best solution would be to patch all applications to use this approach. The only question is whether we need CDRIOCSETBLOCKSIZE. Simon signature.asc Description: Digital signature
Re: Fix for WINE on -CURRENT
Hello! On Mon, Nov 03, 2003 at 11:14:03PM -0600, Scot W. Hetzel wrote: Below is a patch to fix WINE for the new ATA driver. I created this patch based on the ideals from a previous user who had patched 3 other ports to work with -CURRENT's new ATA driver. Could someone familar with the new ATA driver have a look at this patch to make sure it is correct. can you make a patch for cdparanoia as well? cdparanoia is also broken on recent -CURRENT and testing will be easy. /fjoe ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Fix for WINE on -CURRENT
can you make a patch for cdparanoia as well? cdparanoia is also broken on recent -CURRENT and testing will be easy. There is already a PR. I will rewise my patch to use __FreeBSD__ in the patch file instead of using ${EXTRA_PATCHES}. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/57226 This one here should be closed IMHO since there is a cleaner solution that backing out the change. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/58461 Simon signature.asc Description: Digital signature
Fix for WINE on -CURRENT
Below is a patch to fix WINE for the new ATA driver. I created this patch based on the ideals from a previous user who had patched 3 other ports to work with -CURRENT's new ATA driver. Could someone familar with the new ATA driver have a look at this patch to make sure it is correct. Thanks, Scot W. Hetzel Index: Makefile === RCS file: /home/ncvs/ports/emulators/wine/Makefile,v retrieving revision 1.152 diff -u -r1.152 Makefile --- Makefile27 Oct 2003 06:16:28 - 1.152 +++ Makefile4 Nov 2003 04:20:37 - @@ -36,8 +36,8 @@ BROKEN=Not supported on systems prior to FreeBSD 4.x .endif -.if ${OSVERSION} = 501106 -BROKEN=Broken by new ATA driver -.endif - .if defined(DEBUG) Index: files/patch-dlls-ntdll-cdrom.c === RCS file: files/patch-dlls-ntdll-cdrom.c diff -N files/patch-dlls-ntdll-cdrom.c --- /dev/null 1 Jan 1970 00:00:00 - +++ files/patch-dlls-ntdll-cdrom.c 4 Nov 2003 04:46:54 - @@ -0,0 +1,59 @@ +--- dlls/ntdll/cdrom.c.origTue Oct 7 21:59:22 2003 dlls/ntdll/cdrom.c Mon Nov 3 22:46:11 2003 +@@ -65,8 +65,14 @@ + #ifdef HAVE_LINUX_UCDROM_H + # include linux/ucdrom.h + #endif ++#ifdef HAVE_SYS_PARAM_H ++# include sys/param.h ++#endif + #ifdef HAVE_SYS_CDIO_H + # include sys/cdio.h ++#if __FreeBSD_version 501105 ++# include sys/cdrio.h ++#endif + #endif + #ifdef HAVE_SYS_SCSIIO_H + # include sys/scsiio.h +@@ -1352,8 +1358,12 @@ + } + #elif defined(__FreeBSD__) + { ++#if __FreeBSD_version 501106 + struct ioc_read_audio ira; +- ++#else ++ int bsize = sectSize; ++ int begin; ++#endif + switch (raw-TrackMode) + { + case YellowMode2: +@@ -1365,12 +1375,27 @@ + case CDDA: + /* 2048 = 2 ** 11 */ + if (raw-DiskOffset.s.HighPart ~2047) FIXME(Unsupported value\n); ++#if __FreeBSD_version 501106 + ira.address.lba = ((raw-DiskOffset.s.LowPart 11) | + raw-DiskOffset.s.HighPart (32 - 11)) - 1; + ira.address_format = CD_LBA_FORMAT; + ira.nframes = raw-SectorCount; + ira.buffer = buffer; + io = ioctl(cdrom_cache[dev].fd, CDIOCREADAUDIO, ira); ++#else ++ if ((io = ioctl(cdrom_cache[dev].fd, CDRIOCSETBLOCKSIZE, bsize)) == -1) { ++ return CDROM_GetStatusCode(io); ++ } ++ begin = ((raw-DiskOffset.s.LowPart 11) | raw-DiskOffset.s.HighPart (32 - 11)) - 1; ++ io = pread(cdrom_cache[dev].fd, buffer, raw-SectorCount*bsize, begin*bsize); ++ if (io == raw-SectorCount*bsize) { ++ io = 0; ++ } else if (io != -1) { ++ /* We retrieved raw-SectorCount*bsize */ ++ io = 0; /* change to -1, if we are required to return an error */ ++ errno = ESPIPE; ++ } ++#endif + break; + } + } ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]