diff options
author | mycroft <mycroft@pkgsrc.org> | 2004-10-10 10:48:39 +0000 |
---|---|---|
committer | mycroft <mycroft@pkgsrc.org> | 2004-10-10 10:48:39 +0000 |
commit | a63c6c44a2027dc673fd6f2af9cbba7e9c90060d (patch) | |
tree | 64d84aae8761c0d6f38d1b66fc61e2e3f3d95076 /audio | |
parent | c767399c7477ccdce48e8793f022cac15f168e92 (diff) | |
download | pkgsrc-a63c6c44a2027dc673fd6f2af9cbba7e9c90060d.tar.gz |
Fix a problem with our hacked version of cdda_identify_scsi() that was
causing kaudiocreator to fail with a mysterious "Unknown error".
Diffstat (limited to 'audio')
-rw-r--r-- | audio/cdparanoia/distinfo | 4 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-cf | 55 |
2 files changed, 31 insertions, 28 deletions
diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo index 77049de3c49..3e647b7f126 100644 --- a/audio/cdparanoia/distinfo +++ b/audio/cdparanoia/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2004/06/01 20:58:38 shannonjr Exp $ +$NetBSD: distinfo,v 1.9 2004/10/10 10:48:39 mycroft Exp $ SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06 Size (cdparanoia-III-alpha9.8.src.tgz) = 116591 bytes @@ -13,7 +13,7 @@ SHA1 (patch-cb) = 00215d433a86a35ae13f2092efefabadc5967bfb SHA1 (patch-cc) = 0980c20c8fcd11de11294dd8fed0f9555ea0ef0d SHA1 (patch-cd) = a2595237ddbaf35dfc1a5ce0bf7d1fa9244e1d67 SHA1 (patch-ce) = 813f18a27808234a8a9139f0c53951b5fea83b37 -SHA1 (patch-cf) = ce4dc32047c2e382482a38d05144abefb376a87a +SHA1 (patch-cf) = dd96eddefca6a6cd5794a483efa94005fdf8b9f8 SHA1 (patch-cg) = d57b8019fd14baf0701a9a9f824a4f4bd64ab3ad SHA1 (patch-ch) = 73c38418cd7ab5fa5a072abfc78479fdd1d87787 SHA1 (patch-ci) = cff3eaff31ea324d7bde5d0d840df57453085bec diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf index 51bd63d8491..495a546565a 100644 --- a/audio/cdparanoia/patches/patch-cf +++ b/audio/cdparanoia/patches/patch-cf @@ -1,4 +1,4 @@ -$NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ +$NetBSD: patch-cf,v 1.5 2004/10/10 10:48:39 mycroft Exp $ --- interface/scan_devices.c.orig 2001-03-26 15:44:01.000000000 +1000 +++ interface/scan_devices.c @@ -11,7 +11,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ #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,18 @@ "/dev/cm206cd", "/dev/gscd", "/dev/optcd",NULL}; @@ -30,7 +30,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ 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 +85,12 @@ if((d=cdda_identify(buffer,messagedest,messages))) return(d); idmessage(messagedest,messages,"",NULL); @@ -43,7 +43,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ } }else{ /* Name. Go for it. */ -@@ -98,6 +110,16 @@ cdrom_drive *cdda_find_a_cdrom(int messa +@@ -98,6 +110,16 @@ } return(NULL); } @@ -60,7 +60,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ 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 +139,14 @@ } #endif @@ -75,7 +75,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ #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 +174,7 @@ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest, char **messages){ @@ -83,7 +83,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ cdrom_drive *d=NULL; struct stat st; int fd=-1; -@@ -273,8 +302,59 @@ cdrom_drive *cdda_identify_cooked(const +@@ -273,8 +302,59 @@ idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); return(d); @@ -143,7 +143,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ struct sg_id { long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */ long l2; /* Unique id */ -@@ -289,12 +369,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){ @@ -162,7 +162,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ if(ioctl(fd,SCSI_IOCTL_GET_IDLUN,&argid))return(-1); id->bus=argid.l2; /* for now */ id->id=argid.l1&0xff; -@@ -302,6 +388,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; @@ -176,7 +176,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ return(0); } -@@ -390,6 +483,7 @@ matchfail: +@@ -390,6 +483,7 @@ if(dev!=-1)close(dev); return(NULL); } @@ -184,7 +184,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ void strscat(char *a,char *b,int n){ int i; -@@ -401,6 +495,7 @@ void strscat(char *a,char *b,int n){ +@@ -401,6 +495,7 @@ strcat(a," "); } @@ -192,7 +192,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ /* 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 +525,9 @@ static int verify_SG_version(cdrom_drive +@@ -430,7 +525,9 @@ idmessage(messagedest,messages,buffer,""); return(major); } @@ -202,7 +202,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ cdrom_drive *cdda_identify_scsi(const char *generic_device, const char *ioctl_device, int messagedest, char **messages){ -@@ -460,6 +557,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -460,6 +557,7 @@ generic_device); return(NULL); } @@ -210,7 +210,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ 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 +569,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -471,6 +569,7 @@ ioctl_device=temp; } } @@ -218,7 +218,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ } if(ioctl_device){ if(stat(ioctl_device,&i_st)){ -@@ -478,6 +577,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -478,6 +577,7 @@ ioctl_device); return(NULL); } @@ -226,7 +226,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ 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 +589,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -489,6 +589,7 @@ ioctl_device=temp; } } @@ -234,7 +234,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ } /* we need to resolve any symlinks for the lookup code to work */ -@@ -505,6 +606,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -505,6 +606,7 @@ } if(!generic_device || !ioctl_device){ @@ -242,17 +242,20 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ if(generic_device){ ioctl_device= scsi_match(generic_device,scsi_cdrom_prefixes, -@@ -520,6 +622,9 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -520,6 +622,12 @@ if(!generic_device) goto cdda_identify_scsi_fail; } +#else -+ goto cdda_identify_scsi_fail; ++ if(!generic_device) ++ generic_device = strdup(ioctl_device); ++ else ++ ioctl_device = strdup(generic_device); +#endif } idmessage(messagedest,messages,"\t\tgeneric device: %s",generic_device); -@@ -556,6 +661,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -556,6 +664,7 @@ type=(int)(i_st.st_rdev>>8); @@ -260,7 +263,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ if(type==SCSI_CDROM_MAJOR){ if (!S_ISBLK(i_st.st_mode)) { idmessage(messagedest,messages,"\t\tSCSI CDROM device %s not a " -@@ -567,8 +673,10 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -567,8 +676,10 @@ "major number",ioctl_device); goto cdda_identify_scsi_fail; } @@ -271,7 +274,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ 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 +688,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -580,6 +691,7 @@ "major number",generic_device); goto cdda_identify_scsi_fail; } @@ -279,7 +282,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ d=calloc(1,sizeof(cdrom_drive)); -@@ -590,6 +699,7 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -590,6 +702,7 @@ d->bigendianp=-1; /* We don't know yet... */ d->nsectors=-1; @@ -287,7 +290,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ version=verify_SG_version(d,messagedest,messages); switch(version){ case -1:case 0:case 1: -@@ -599,6 +709,9 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -599,6 +712,9 @@ d->interface=GENERIC_SCSI; break; } @@ -297,7 +300,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ /* malloc our big buffer for scsi commands */ d->sg=malloc(MAX_BIG_BUFF_SIZE); -@@ -617,7 +730,16 @@ cdrom_drive *cdda_identify_scsi(const ch +@@ -617,7 +733,16 @@ /* It would seem some TOSHIBA CDROMs gets things wrong */ @@ -315,7 +318,7 @@ $NetBSD: patch-cf,v 1.4 2003/10/20 12:07:23 grant Exp $ !strncmp (p + 16, "CD-ROM", 6) && p[0] == TYPE_DISK) { p[0] = TYPE_ROM; -@@ -653,6 +775,87 @@ cdda_identify_scsi_fail: +@@ -653,6 +778,87 @@ if(g_fd!=-1)close(g_fd); return(NULL); } |