summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authordholland <dholland>2009-05-17 21:29:33 +0000
committerdholland <dholland>2009-05-17 21:29:33 +0000
commit428b64445b0ade05629c0e46a6f9eaaf7da7af06 (patch)
tree267f0cce975a14afc8c7ca0077295feb91528bd2 /audio
parenta8bb1ac32282ab27740928ed59cbcc48bbdc9d30 (diff)
downloadpkgsrc-428b64445b0ade05629c0e46a6f9eaaf7da7af06.tar.gz
Make the cdrom device probe work properly under NetBSD, instead of
messily hardwiring it to /dev/rcd0[cd]; the latter apparently breaks in some circumstances. Uses as a starting point a patch from Kimura Fuyuki in PR 34008. PKGREVISION++ (to 7).
Diffstat (limited to 'audio')
-rw-r--r--audio/cdparanoia/Makefile4
-rw-r--r--audio/cdparanoia/distinfo10
-rw-r--r--audio/cdparanoia/patches/patch-ab8
-rw-r--r--audio/cdparanoia/patches/patch-ae55
-rw-r--r--audio/cdparanoia/patches/patch-ca15
-rw-r--r--audio/cdparanoia/patches/patch-cf104
6 files changed, 105 insertions, 91 deletions
diff --git a/audio/cdparanoia/Makefile b/audio/cdparanoia/Makefile
index ae5e4036208..3ac8ae8ae72 100644
--- a/audio/cdparanoia/Makefile
+++ b/audio/cdparanoia/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.25 2007/02/22 19:26:05 wiz Exp $
+# $NetBSD: Makefile,v 1.26 2009/05/17 21:29:33 dholland Exp $
#
DISTNAME= cdparanoia-III-alpha9.8
PKGNAME= cdparanoia-3.0.9.8
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= audio
MASTER_SITES= http://www.xiph.org/paranoia/download/
EXTRACT_SUFX= .src.tgz
diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo
index 548085474b7..92c133b8559 100644
--- a/audio/cdparanoia/distinfo
+++ b/audio/cdparanoia/distinfo
@@ -1,20 +1,20 @@
-$NetBSD: distinfo,v 1.20 2007/10/09 21:26:11 heinz Exp $
+$NetBSD: distinfo,v 1.21 2009/05/17 21:29:33 dholland Exp $
SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06
RMD160 (cdparanoia-III-alpha9.8.src.tgz) = d9225165f83b5386c58db263d6918a7006df1481
Size (cdparanoia-III-alpha9.8.src.tgz) = 116591 bytes
SHA1 (patch-aa) = 29fd5767b37360fe804013bb171fc7e5f4d8311f
-SHA1 (patch-ab) = 7b3d4b325c4095c08425cc28033297f1ffc3ce95
+SHA1 (patch-ab) = fcbeaf7f3e1318ef8bcc8742adec3a3a7efc937e
SHA1 (patch-ac) = 6bd7ad7a0e8bcd1f8354c73706cafb0e789b8252
SHA1 (patch-ad) = 9a1ea1b98b5f3810e1ccae57beb8c68b5e189716
-SHA1 (patch-ae) = 6ba166c2ac73b9c03a1944989c6ffbe655d80c71
+SHA1 (patch-ae) = 59d74c0392d5bcc37299326efa8ba700722d5cf4
SHA1 (patch-ba) = 51151796493c946e5bdafbd22005136ea7f27a09
-SHA1 (patch-ca) = 9c35254c09a96b622cac44198443f66f7bc0e428
+SHA1 (patch-ca) = 433b7ddd7d1cf0123dadfdff8e550381eaf51f22
SHA1 (patch-cb) = c19ee04017b836842bb0f2d2c77e8f35aad0f9bb
SHA1 (patch-cc) = adea4fd9682c0543e5749c6f3fe73697d8663c6c
SHA1 (patch-cd) = 81d31fb55db0f982959395cdecc3da826bf23bfb
SHA1 (patch-ce) = 3a4e9a83753e2eb6595bcb4e7a47c42b72ef5702
-SHA1 (patch-cf) = d8cde95f9efa9c1941768468c30b1152c083830f
+SHA1 (patch-cf) = ae8c19f7df5dbb97c258ea808834c3e13809b185
SHA1 (patch-cg) = c962cbc84f021e399b6f210d0e7a140fd7004222
SHA1 (patch-ch) = 8d16dd8c80e8f1ee35ccc299ba927d685adde01c
SHA1 (patch-ci) = 60db1d1d2e8ec9c6d446543762218b22c597d986
diff --git a/audio/cdparanoia/patches/patch-ab b/audio/cdparanoia/patches/patch-ab
index 4ea6e45bacf..512c4f60110 100644
--- a/audio/cdparanoia/patches/patch-ab
+++ b/audio/cdparanoia/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.7 2006/11/03 12:45:21 joerg Exp $
+$NetBSD: patch-ab,v 1.8 2009/05/17 21:29:34 dholland Exp $
---- Makefile.in.orig 2001-03-27 22:46:58.000000000 +0000
-+++ Makefile.in
+--- Makefile.in.orig 2001-03-27 17:46:58.000000000 -0500
++++ Makefile.in 2009-05-17 17:21:32.000000000 -0400
@@ -3,12 +3,12 @@
# DO NOT EDIT BELOW! ##########################################################
# (unless, of course, you know what you are doing :) ##########################
@@ -13,7 +13,7 @@ $NetBSD: patch-ab,v 1.7 2006/11/03 12:45:21 joerg Exp $
@SET_MAKE@
-FLAGS=@TYPESIZES@ @CFLAGS@
-+FLAGS=@GETOPT_LONG@ @RAWPART@ @TYPESIZES@ @CFLAGS@
++FLAGS=@GETOPT_LONG@ @TYPESIZES@ @CFLAGS@
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ $(FLAGS)
CC=@CC@
diff --git a/audio/cdparanoia/patches/patch-ae b/audio/cdparanoia/patches/patch-ae
index cdb0681cd3e..793bb81565d 100644
--- a/audio/cdparanoia/patches/patch-ae
+++ b/audio/cdparanoia/patches/patch-ae
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
+$NetBSD: patch-ae,v 1.6 2009/05/17 21:29:34 dholland Exp $
---- main.c.orig 2001-03-25 19:44:50.000000000 -0800
-+++ main.c
-@@ -49,12 +49,18 @@
+--- main.c.orig 2001-03-25 22:44:50.000000000 -0500
++++ main.c 2009-05-17 17:20:20.000000000 -0400
+@@ -49,7 +49,9 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
@@ -12,16 +12,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
#include <errno.h>
#include <math.h>
#include <sys/time.h>
- #include <sys/stat.h>
-
-+#ifdef HAVE_GETRAWPARTITION
-+#include <util.h>
-+#endif
-+
- #include "interface/cdda_interface.h"
- #include "paranoia/cdda_paranoia.h"
- #include "utils.h"
-@@ -231,6 +237,7 @@ VERSION"\n"
+@@ -231,6 +233,7 @@ VERSION"\n"
" cdparanoia [options] <span> [outfile]\n\n"
"OPTIONS:\n"
@@ -29,7 +20,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
" -v --verbose : extra verbose operation\n"
" -q --quiet : quiet operation\n"
" -e --stderr-progress : force output of progress information to\n"
-@@ -256,9 +263,11 @@ VERSION"\n"
+@@ -256,9 +259,11 @@ VERSION"\n"
" to n sectors\n"
" -o --force-search-overlap <n> : force minimum overlap search during\n"
" verification to n sectors\n"
@@ -41,7 +32,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
" -S --force-read-speed <n> : read from device at specified speed\n"
" -t --toc-offset <n> : Add <n> sectors to the values reported\n"
" when addressing tracks. May be negative\n"
-@@ -276,6 +285,52 @@ VERSION"\n"
+@@ -276,6 +281,52 @@ VERSION"\n"
" -Z --disable-paranoia : disable all paranoia checking\n"
" -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking\n"
" -X --abort-on-skip : abort on imperfect reads/skips\n\n"
@@ -94,7 +85,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
"OUTPUT SMILIES:\n"
" :-) Normal operation, low/no jitter\n"
-@@ -376,7 +431,7 @@ static void callback(long inpos, int fun
+@@ -376,7 +427,7 @@ static void callback(long inpos, int fun
int graph=30;
char buffer[256];
static long c_sector=0,v_sector=0;
@@ -103,7 +94,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
static int last=0;
static long lasttime=0;
long sector,osector=0;
-@@ -587,6 +642,7 @@ static void callback(long inpos, int fun
+@@ -587,6 +638,7 @@ static void callback(long inpos, int fun
const char *optstring = "escCn:o:O:d:g:S:prRwafvqVQhZz::YXWBi:Tt:";
@@ -111,7 +102,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
struct option options [] = {
{"stderr-progress",no_argument,NULL,'e'},
{"search-for-drive",no_argument,NULL,'s'},
-@@ -621,6 +677,7 @@ struct option options [] = {
+@@ -621,6 +673,7 @@ struct option options [] = {
{NULL,0,NULL,0}
};
@@ -119,7 +110,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
long blocking_write(int outf, char *buffer, long num){
long words=0,temp;
-@@ -673,7 +730,12 @@ int main(int argc,char *argv[]){
+@@ -673,7 +726,12 @@ int main(int argc,char *argv[]){
atexit(cleanup);
@@ -133,7 +124,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
switch(c){
case 'B':
batch=1;
-@@ -690,6 +752,7 @@ int main(int argc,char *argv[]){
+@@ -690,6 +748,7 @@ int main(int argc,char *argv[]){
case 'o':
force_cdrom_overlap=atoi(optarg);
break;
@@ -141,7 +132,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
case 'd':
if(force_cdrom_device)free(force_cdrom_device);
force_cdrom_device=copystring(optarg);
-@@ -698,6 +761,7 @@ int main(int argc,char *argv[]){
+@@ -698,6 +757,7 @@ int main(int argc,char *argv[]){
if(force_generic_device)free(force_generic_device);
force_generic_device=copystring(optarg);
break;
@@ -149,7 +140,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
case 'S':
force_cdrom_speed=atoi(optarg);
break;
-@@ -811,6 +875,30 @@ int main(int argc,char *argv[]){
+@@ -811,6 +871,18 @@ int main(int argc,char *argv[]){
/* Query the cdrom/disc; we may need to override some settings */
@@ -157,19 +148,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
+ d=cdda_find_a_cdrom(verbose,NULL);
+#else
+#ifndef __linux__ /* XXX */
-+#ifdef __NetBSD__
-+ if (!force_generic_device) {
-+ int raw;
-+ static char devstring[16];
-+#ifdef HAVE_GETRAWPARTITION
-+ raw = getrawpartition();
-+#else
-+ raw = 'c' - 'a';
-+#endif
-+ snprintf(devstring, sizeof(devstring) - 1, "/dev/rcd0%c", raw + 'a');
-+ force_generic_device=devstring;
-+ }
-+#else
++#ifndef __NetBSD__ /* XXX: is this needed? */
+ if (!force_generic_device)
+ errx(1, "-g option is currently required by the NetBSD pkg version");
+#endif
@@ -180,7 +159,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
if(force_generic_device)
d=cdda_identify_scsi(force_generic_device,force_cdrom_device,verbose,NULL);
else
-@@ -841,6 +929,7 @@ int main(int argc,char *argv[]){
+@@ -841,6 +913,7 @@ int main(int argc,char *argv[]){
report("");
}
}
@@ -188,7 +167,7 @@ $NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
if(!d){
if(!verbose)
-@@ -878,7 +967,9 @@ int main(int argc,char *argv[]){
+@@ -878,7 +951,9 @@ int main(int argc,char *argv[]){
"ignoring preset and autosense",force_cdrom_sectors);
report(buffer);
d->nsectors=force_cdrom_sectors;
diff --git a/audio/cdparanoia/patches/patch-ca b/audio/cdparanoia/patches/patch-ca
index 98e508d3cc6..ff9ed5f3d9a 100644
--- a/audio/cdparanoia/patches/patch-ca
+++ b/audio/cdparanoia/patches/patch-ca
@@ -1,7 +1,16 @@
-$NetBSD: patch-ca,v 1.5 2006/09/03 17:13:30 ben Exp $
+$NetBSD: patch-ca,v 1.6 2009/05/17 21:29:34 dholland Exp $
---- interface/Makefile.in.orig 1999-12-13 20:27:59.000000000 -0800
-+++ interface/Makefile.in
+--- interface/Makefile.in.orig 1999-12-13 23:27:59.000000000 -0500
++++ interface/Makefile.in 2009-05-17 17:16:52.000000000 -0400
+@@ -7,7 +7,7 @@ VPATH=@srcdir@
+ srcdir=@srcdir@
+
+ @SET_MAKE@
+-FLAGS=@SBPCD_H@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@
++FLAGS=@SBPCD_H@ @UCDROM_H@ @RAWPART@ @TYPESIZES@ @CFLAGS@
+ OPT=@OPT@ $(FLAGS)
+ DEBUG=@DEBUG@ $(FLAGS) -DCDDA_TEST
+ CC=@CC@
@@ -18,12 +18,10 @@ RANLIB=@RANLIB@
LIBS = -lm
CPPFLAGS+=-D_REENTRANT
diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf
index 981adcb6940..2fa31e9b3c5 100644
--- a/audio/cdparanoia/patches/patch-cf
+++ b/audio/cdparanoia/patches/patch-cf
@@ -1,7 +1,7 @@
-$NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
+$NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
---- interface/scan_devices.c.orig 2001-03-26 07:44:01.000000000 +0200
-+++ interface/scan_devices.c
+--- interface/scan_devices.c.orig 2001-03-26 00:44:01.000000000 -0500
++++ interface/scan_devices.c 2009-05-17 16:47:49.000000000 -0400
@@ -1,6 +1,8 @@
/******************************************************************
* CopyPolicy: GNU Public License 2 applies
@@ -11,7 +11,17 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
*
* Autoscan for or verify presence of a cdrom device
*
-@@ -19,6 +21,8 @@
+@@ -14,11 +16,18 @@
+ #include <pwd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++
++#ifdef HAVE_GETRAWPARTITION
++#include <util.h>
++#endif
++
+ #include "cdda_interface.h"
+ #include "low_interface.h"
#include "common_interface.h"
#include "utils.h"
@@ -20,7 +30,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
/* must be absolute paths! */
static char *scsi_cdrom_prefixes[]={
-@@ -49,11 +53,24 @@ static char *cdrom_devices[]={
+@@ -49,15 +58,43 @@ static char *cdrom_devices[]={
"/dev/cm206cd",
"/dev/gscd",
"/dev/optcd",NULL};
@@ -30,12 +40,16 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
+ "/dev/acd?c",
+ "/dev/wcd?c",
+ "/dev/mcd?c", NULL};
++#elif defined(__NetBSD__)
++static char *cdrom_devices[] = {
++ "/dev/rcd?c",
++ "/dev/cd?c", NULL};
+#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__) || (defined(__APPLE__) && defined(__MACH__))
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))
cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages){
+#if defined(__APPLE__) && defined(__MACH__)
+ cdrom_drive *d = calloc(1, sizeof(cdrom_drive));
@@ -45,7 +59,28 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
/* Brute force... */
int i=0;
-@@ -75,10 +92,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+ cdrom_drive *d;
++#ifdef __NetBSD__
++ int rawpartition;
++#endif
++
++#ifdef __NetBSD__
++#ifdef HAVE_GETRAWPARTITION
++ rawpartition = getrawpartition();
++#else
++ rawpartition = 'c' - 'a';
++#endif
++#endif
+
+ while(cdrom_devices[i]!=NULL){
+
+@@ -72,13 +109,18 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+ /* number, then letter */
+
+ buffer[pos-(cdrom_devices[i])]=j+48;
++#ifdef __NetBSD__
++ buffer[(pos+1)-(cdrom_devices[i])]='a'+rawpartition;
++#endif
if((d=cdda_identify(buffer,messagedest,messages)))
return(d);
idmessage(messagedest,messages,"",NULL);
@@ -58,7 +93,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
}
}else{
/* Name. Go for it. */
-@@ -97,8 +116,20 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+@@ -97,8 +139,11 @@ cdrom_drive *cdda_find_a_cdrom(int messa
temp->pw_name);
}
return(NULL);
@@ -66,20 +101,11 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
}
+#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__ */
-+
+#if !(defined(__APPLE__) && defined(__MACH__))
cdrom_drive *cdda_identify(const char *device, int messagedest,char **messages){
struct stat st;
cdrom_drive *d=NULL;
-@@ -117,8 +148,14 @@ cdrom_drive *cdda_identify(const char *d
+@@ -117,8 +162,14 @@ cdrom_drive *cdda_identify(const char *d
}
#endif
@@ -94,7 +120,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
#ifdef CDDA_TEST
if(!d)d=cdda_identify_test(device,messagedest,messages);
-@@ -146,6 +183,7 @@ char *test_resolve_symlink(const char *f
+@@ -146,6 +197,7 @@ char *test_resolve_symlink(const char *f
cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
char **messages){
@@ -102,7 +128,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
cdrom_drive *d=NULL;
struct stat st;
int fd=-1;
-@@ -273,8 +311,60 @@ cdrom_drive *cdda_identify_cooked(const
+@@ -273,8 +325,60 @@ cdrom_drive *cdda_identify_cooked(const
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -163,7 +189,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
struct sg_id {
long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */
long l2; /* Unique id */
-@@ -289,12 +379,18 @@ typedef struct scsiid{
+@@ -289,12 +393,18 @@ typedef struct scsiid{
/* 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){
@@ -182,7 +208,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
if(ioctl(fd,SCSI_IOCTL_GET_IDLUN,&argid))return(-1);
id->bus=argid.l2; /* for now */
id->id=argid.l1&0xff;
-@@ -302,6 +398,13 @@ static int get_scsi_id(int fd, scsiid *i
+@@ -302,6 +412,13 @@ static int get_scsi_id(int fd, scsiid *i
if(ioctl(fd,SCSI_IOCTL_GET_BUS_NUMBER,&busarg)==0)
id->bus=busarg;
@@ -196,7 +222,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
return(0);
}
-@@ -390,6 +493,7 @@ matchfail:
+@@ -390,6 +507,7 @@ matchfail:
if(dev!=-1)close(dev);
return(NULL);
}
@@ -204,7 +230,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
void strscat(char *a,char *b,int n){
int i;
-@@ -401,6 +505,7 @@ void strscat(char *a,char *b,int n){
+@@ -401,6 +519,7 @@ void strscat(char *a,char *b,int n){
strcat(a," ");
}
@@ -212,7 +238,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz 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 +535,9 @@ static int verify_SG_version(cdrom_drive
+@@ -430,7 +549,9 @@ static int verify_SG_version(cdrom_drive
idmessage(messagedest,messages,buffer,"");
return(major);
}
@@ -222,7 +248,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
cdrom_drive *cdda_identify_scsi(const char *generic_device,
const char *ioctl_device, int messagedest,
char **messages){
-@@ -460,6 +567,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -460,6 +581,7 @@ cdrom_drive *cdda_identify_scsi(const ch
generic_device);
return(NULL);
}
@@ -230,7 +256,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz 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 +579,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -471,6 +593,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device=temp;
}
}
@@ -238,7 +264,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
}
if(ioctl_device){
if(stat(ioctl_device,&i_st)){
-@@ -478,6 +587,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -478,6 +601,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device);
return(NULL);
}
@@ -246,7 +272,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz 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 +599,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -489,6 +613,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device=temp;
}
}
@@ -254,7 +280,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
}
/* we need to resolve any symlinks for the lookup code to work */
-@@ -505,6 +616,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -505,6 +630,7 @@ cdrom_drive *cdda_identify_scsi(const ch
}
if(!generic_device || !ioctl_device){
@@ -262,7 +288,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
if(generic_device){
ioctl_device=
scsi_match(generic_device,scsi_cdrom_prefixes,
-@@ -520,6 +632,12 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -520,6 +646,12 @@ cdrom_drive *cdda_identify_scsi(const ch
if(!generic_device)
goto cdda_identify_scsi_fail;
}
@@ -275,7 +301,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
}
idmessage(messagedest,messages,"\t\tgeneric device: %s",generic_device);
-@@ -556,6 +674,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -556,6 +688,7 @@ cdrom_drive *cdda_identify_scsi(const ch
type=(int)(i_st.st_rdev>>8);
@@ -283,7 +309,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz 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 +686,10 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -567,8 +700,10 @@ cdrom_drive *cdda_identify_scsi(const ch
"major number",ioctl_device);
goto cdda_identify_scsi_fail;
}
@@ -294,7 +320,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz 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 +701,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -580,6 +715,7 @@ cdrom_drive *cdda_identify_scsi(const ch
"major number",generic_device);
goto cdda_identify_scsi_fail;
}
@@ -302,7 +328,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
d=calloc(1,sizeof(cdrom_drive));
-@@ -590,6 +712,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -590,6 +726,7 @@ cdrom_drive *cdda_identify_scsi(const ch
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
@@ -310,7 +336,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
version=verify_SG_version(d,messagedest,messages);
switch(version){
case -1:case 0:case 1:
-@@ -599,6 +722,9 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -599,6 +736,9 @@ cdrom_drive *cdda_identify_scsi(const ch
d->interface=GENERIC_SCSI;
break;
}
@@ -320,7 +346,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
/* malloc our big buffer for scsi commands */
d->sg=malloc(MAX_BIG_BUFF_SIZE);
-@@ -617,7 +743,16 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -617,7 +757,16 @@ cdrom_drive *cdda_identify_scsi(const ch
/* It would seem some TOSHIBA CDROMs gets things wrong */
@@ -338,7 +364,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
!strncmp (p + 16, "CD-ROM", 6) &&
p[0] == TYPE_DISK) {
p[0] = TYPE_ROM;
-@@ -653,6 +788,88 @@ cdda_identify_scsi_fail:
+@@ -653,6 +802,88 @@ cdda_identify_scsi_fail:
if(g_fd!=-1)close(g_fd);
return(NULL);
}
@@ -427,7 +453,7 @@ $NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
#ifdef CDDA_TEST
-@@ -702,3 +919,4 @@ cdrom_drive *cdda_identify_test(const ch
+@@ -702,3 +933,4 @@ cdrom_drive *cdda_identify_test(const ch
}
#endif