ports/63785: Update port: audio/xmms-cdread Drive read speed fix

Igor Pokrovsky tiamat at comset.net
Fri Mar 5 03:10:18 UTC 2004


>Number:         63785
>Category:       ports
>Synopsis:       Update port: audio/xmms-cdread Drive read speed fix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 04 19:10:18 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Igor Pokrovsky
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD doom.homeunix.org 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Feb 26 21:34:55 MSK 2004 root at doom.homeunix.org:/usr/obj/usr/src/sys/KERNEL i386


	
>Description:
	Drive read speed selection now works correctly.
	(I've got tired of slowing drive speed down with cdcontrol(1)).
	
>How-To-Repeat:
	
>Fix:

	

--- xmms-cdread.diff begins here ---
Index: xmms-cdread/files/patch-cdrombsd.h
===================================================================
RCS file: /home/ncvs/ports/audio/xmms-cdread/files/patch-cdrombsd.h,v
retrieving revision 1.2
diff -u -r1.2 patch-cdrombsd.h
--- xmms-cdread/files/patch-cdrombsd.h	20 Nov 2003 22:31:21 -0000	1.2
+++ xmms-cdread/files/patch-cdrombsd.h	4 Mar 2004 06:55:36 -0000
@@ -1,15 +1,13 @@
---- cdrombsd.h.orig	Sat Aug 18 15:09:10 2001
-+++ cdrombsd.h	Thu Nov 20 19:24:05 2003
-@@ -5,15 +5,19 @@
+--- cdrombsd.h.orig	Sat Aug 18 14:09:10 2001
++++ cdrombsd.h	Thu Mar  4 09:55:32 2004
+@@ -5,15 +5,17 @@
  #ifndef CDROMBSD_H
  #define CDROMBSD_H
  #include <sys/param.h>
-+#if __FreeBSD_version >= 501106
 +#include <sys/cdrio.h>
 +#ifndef CD_FRAMESIZE_RAW
 +#define CD_FRAMESIZE_RAW 2352
 +#endif
-+#endif
  /*\
  |*| FreeBSD (?) specific code
  \*/
@@ -25,7 +23,25 @@
  
  
  /*\
-@@ -84,6 +88,16 @@
+@@ -26,16 +28,14 @@
+ 	int fd;
+ 	fd = open(device, O_RDONLY|O_NONBLOCK);
+ 	if (fd < 0) return -1;
+-#ifdef CDROM_SELECT_SPEED
+ 	if (!(*flags & FLAG_FAIL_SPD) &&
+-	    (ioctl(fd, CDROM_SELECT_SPEED, cd_cfg.cdrom_speed) < 0)) {
++	    (ioctl(fd, CDRIOCREADSPEED, &cd_cfg.cdrom_speed) < 0)) {
+ 		if (errno == ENOTTY) {
+ 			close(fd);
+ 			return -1;
+ 		}
+ 		*flags |= FLAG_FAIL_SPD;
+ 	}
+-#endif
+ 	return fd;
+ }
+ 
+@@ -84,6 +84,16 @@
  |*|  from device cdfd, at position lba
  |*|  Return number of successfully read frames, -1 on error.
  \*/
@@ -42,7 +58,7 @@
  static int
  cdrom_read_audio(int cdfd, int lba, char *buf, int btw)
  {
-@@ -101,6 +115,7 @@
+@@ -101,6 +111,7 @@
  	} while (--rtr >= 0);
  	return -1;
  }
--- xmms-cdread.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list