pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/34008: audio/cdparanoia: cdda_find_a_cdrom() disabled
>Number: 34008
>Category: pkg
>Synopsis: audio/cdparanoia: cdda_find_a_cdrom() disabled
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 15 23:50:00 +0000 2006
>Originator: Kimura Fuyuki
>Release: 3.99.22
>Organization:
>Environment:
NetBSD lapis.hadaly.org 3.99.22 NetBSD 3.99.22 (LAPIS) #36: Sat Jul 15 09:18:44
JST 2006
fuyuki%lapis.hadaly.org@localhost:/usr/obj/sys/arch/i386/compile/LAPIS i386
>Description:
cdda_find_a_cdrom() intentionally disabled by a patch on NetBSD. This
causes "protocol down" on access of audiocd:/ from konqueror.
>How-To-Repeat:
>Fix:
See also k3b/patches/patch-ad.
cvs diff: Diffing .
Index: distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/audio/cdparanoia/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- distinfo 14 May 2006 21:31:01 -0000 1.14
+++ distinfo 15 Jul 2006 23:41:23 -0000
@@ -14,7 +14,7 @@
SHA1 (patch-cc) = 311f8e45a9c3bc86cdb106730295f28a856ae2ab
SHA1 (patch-cd) = 81a35822f89b4f674f03cbcbd5831cac96c3aa92
SHA1 (patch-ce) = 282e3169cc26ab11924c66a312d77d7c1f59f242
-SHA1 (patch-cf) = 3ccf5e52737cb449dbead92c582646d0ebe24500
+SHA1 (patch-cf) = 7ecde0216f2e514063f95a9bc75979b847110c98
SHA1 (patch-cg) = b9786ee81dcb7bd2f6572a20f424dd5291a8720d
SHA1 (patch-ch) = d28ec06a56499ff96491edc49d462f43c41d15fe
SHA1 (patch-ci) = 7d041cabce0a8935fd1807766a93eb72e7c9c717
cvs diff: Diffing patches
Index: patches/patch-cf
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/audio/cdparanoia/patches/patch-cf,v
retrieving revision 1.6
diff -u -r1.6 patch-cf
--- patches/patch-cf 7 Mar 2006 06:29:03 -0000 1.6
+++ patches/patch-cf 15 Jul 2006 23:41:24 -0000
@@ -11,7 +11,7 @@
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
/* must be absolute paths! */
static char *scsi_cdrom_prefixes[]={
-@@ -49,10 +51,18 @@ static char *cdrom_devices[]={
+@@ -49,10 +51,26 @@
"/dev/cm206cd",
"/dev/gscd",
"/dev/optcd",NULL};
@@ -21,16 +21,24 @@
+ "/dev/acd?c",
+ "/dev/wcd?c",
+ "/dev/mcd?c", NULL};
++#elif defined(__NetBSD__)
++#if defined(__i386__) || defined (__amd64__) || defined (__bebox__)
++static char *cdrom_devices[] = {
++ "/dev/cd?d", NULL};
++#else
++static char *cdrom_devices[] = {
++ "/dev/cd?c", NULL};
++#endif
+#endif
/* Functions here look for a cdrom drive; full init of a drive type
happens in interface.c */
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) ||
defined(__NetBSD__)
cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages){
/* Brute force... */
-@@ -75,10 +85,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+@@ -75,10 +93,12 @@
if((d=cdda_identify(buffer,messagedest,messages)))
return(d);
idmessage(messagedest,messages,"",NULL);
@@ -43,24 +51,15 @@
}
}else{
/* Name. Go for it. */
-@@ -98,6 +110,16 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+@@ -98,6 +118,7 @@
}
return(NULL);
}
+#endif /* __linux__ */
-+
-+#ifdef __NetBSD__
-+
-+cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages)
-+{
-+ errx(1, "cdda_find_a_cdrom: not implemented");
-+ /* NOTREACHED */
-+}
-+#endif /* __NetBSD__ */
cdrom_drive *cdda_identify(const char *device, int messagedest,char
**messages){
struct stat st;
-@@ -117,8 +139,14 @@ cdrom_drive *cdda_identify(const char *d
+@@ -117,8 +138,14 @@
}
#endif
@@ -75,7 +74,7 @@
#ifdef CDDA_TEST
if(!d)d=cdda_identify_test(device,messagedest,messages);
-@@ -146,6 +174,7 @@ char *test_resolve_symlink(const char *f
+@@ -146,6 +173,7 @@
cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
char **messages){
@@ -83,7 +82,7 @@
cdrom_drive *d=NULL;
struct stat st;
int fd=-1;
-@@ -273,8 +302,60 @@ cdrom_drive *cdda_identify_cooked(const
+@@ -273,8 +301,60 @@
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -144,7 +143,7 @@
struct sg_id {
long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */
long l2; /* Unique id */
-@@ -289,12 +370,18 @@ typedef struct scsiid{
+@@ -289,12 +369,18 @@
/* Even *this* isn't as simple as it bloody well should be :-P */
/* SG has an easy interface, but SCSI overall does not */
static int get_scsi_id(int fd, scsiid *id){
@@ -163,7 +162,7 @@
if(ioctl(fd,SCSI_IOCTL_GET_IDLUN,&argid))return(-1);
id->bus=argid.l2; /* for now */
id->id=argid.l1&0xff;
-@@ -302,6 +389,13 @@ static int get_scsi_id(int fd, scsiid *i
+@@ -302,6 +388,13 @@
if(ioctl(fd,SCSI_IOCTL_GET_BUS_NUMBER,&busarg)==0)
id->bus=busarg;
@@ -177,7 +176,7 @@
return(0);
}
-@@ -390,6 +484,7 @@ matchfail:
+@@ -390,6 +483,7 @@
if(dev!=-1)close(dev);
return(NULL);
}
@@ -185,7 +184,7 @@
void strscat(char *a,char *b,int n){
int i;
-@@ -401,6 +496,7 @@ void strscat(char *a,char *b,int n){
+@@ -401,6 +495,7 @@
strcat(a," ");
}
@@ -193,7 +192,7 @@
/* At this point, we're going to punt compatability before SG2, and
allow only SG2 and SG3 */
static int verify_SG_version(cdrom_drive *d,int messagedest,
-@@ -430,7 +526,9 @@ static int verify_SG_version(cdrom_drive
+@@ -430,7 +525,9 @@
idmessage(messagedest,messages,buffer,"");
return(major);
}
@@ -203,7 +202,7 @@
cdrom_drive *cdda_identify_scsi(const char *generic_device,
const char *ioctl_device, int messagedest,
char **messages){
-@@ -460,6 +558,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -460,6 +557,7 @@
generic_device);
return(NULL);
}
@@ -211,7 +210,7 @@
if((int)(g_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
if((int)(g_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -471,6 +570,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -471,6 +569,7 @@
ioctl_device=temp;
}
}
@@ -219,7 +218,7 @@
}
if(ioctl_device){
if(stat(ioctl_device,&i_st)){
-@@ -478,6 +578,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -478,6 +577,7 @@
ioctl_device);
return(NULL);
}
@@ -227,7 +226,7 @@
if((int)(i_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
if((int)(i_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -489,6 +590,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -489,6 +589,7 @@
ioctl_device=temp;
}
}
@@ -235,7 +234,7 @@
}
/* we need to resolve any symlinks for the lookup code to work */
-@@ -505,6 +607,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -505,6 +606,7 @@
}
if(!generic_device || !ioctl_device){
@@ -243,7 +242,7 @@
if(generic_device){
ioctl_device=
scsi_match(generic_device,scsi_cdrom_prefixes,
-@@ -520,6 +623,12 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -520,6 +622,12 @@
if(!generic_device)
goto cdda_identify_scsi_fail;
}
@@ -256,7 +255,7 @@
}
idmessage(messagedest,messages,"\t\tgeneric device: %s",generic_device);
-@@ -556,6 +665,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -556,6 +664,7 @@
type=(int)(i_st.st_rdev>>8);
@@ -264,7 +263,7 @@
if(type==SCSI_CDROM_MAJOR){
if (!S_ISBLK(i_st.st_mode)) {
idmessage(messagedest,messages,"\t\tSCSI CDROM device %s not a "
-@@ -567,8 +677,10 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -567,8 +676,10 @@
"major number",ioctl_device);
goto cdda_identify_scsi_fail;
}
@@ -275,7 +274,7 @@
if((int)(g_st.st_rdev>>8)==SCSI_GENERIC_MAJOR){
if (!S_ISCHR(g_st.st_mode)) {
idmessage(messagedest,messages,"\t\tGeneric SCSI device %s not a "
-@@ -580,6 +692,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -580,6 +691,7 @@
"major number",generic_device);
goto cdda_identify_scsi_fail;
}
@@ -283,7 +282,7 @@
d=calloc(1,sizeof(cdrom_drive));
-@@ -590,6 +703,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -590,6 +702,7 @@
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
@@ -291,7 +290,7 @@
version=verify_SG_version(d,messagedest,messages);
switch(version){
case -1:case 0:case 1:
-@@ -599,6 +713,9 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -599,6 +712,9 @@
d->interface=GENERIC_SCSI;
break;
}
@@ -301,7 +300,7 @@
/* malloc our big buffer for scsi commands */
d->sg=malloc(MAX_BIG_BUFF_SIZE);
-@@ -617,7 +734,16 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -617,7 +733,16 @@
/* It would seem some TOSHIBA CDROMs gets things wrong */
@@ -319,7 +318,7 @@
!strncmp (p + 16, "CD-ROM", 6) &&
p[0] == TYPE_DISK) {
p[0] = TYPE_ROM;
-@@ -653,6 +779,88 @@ cdda_identify_scsi_fail:
+@@ -653,6 +778,88 @@
if(g_fd!=-1)close(g_fd);
return(NULL);
}
Home |
Main Index |
Thread Index |
Old Index