diff options
Diffstat (limited to 'audio/cdparanoia/patches/patch-cg')
-rw-r--r-- | audio/cdparanoia/patches/patch-cg | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/audio/cdparanoia/patches/patch-cg b/audio/cdparanoia/patches/patch-cg index 0f5f0aacc8b..d3d9ed114ba 100644 --- a/audio/cdparanoia/patches/patch-cg +++ b/audio/cdparanoia/patches/patch-cg @@ -1,8 +1,17 @@ -$NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ +$NetBSD: patch-cg,v 1.9 2007/10/09 21:26:11 heinz Exp $ ---- interface/scsi_interface.c.orig 2001-03-24 12:15:46.000000000 +1100 +--- interface/scsi_interface.c.orig 2001-03-24 02:15:46.000000000 +0100 +++ interface/scsi_interface.c -@@ -23,6 +23,8 @@ static void tweak_SG_buffer(cdrom_drive +@@ -3,6 +3,8 @@ + * Original interface.c Copyright (C) 1994-1997 + * Eissfeldt heiko@colossus.escape.de + * Current blenderization Copyright (C) 1998-1999 Monty xiphmont@mit.edu ++ * FreeBSD porting (c) 2003 ++ * Simon 'corecode' Schubert <corecode@corecode.ath.cx> + * + * Generic SCSI interface specific code. + * +@@ -23,6 +25,8 @@ static void tweak_SG_buffer(cdrom_drive int table,reserved; char buffer[256]; @@ -11,7 +20,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ /* maximum transfer size? */ if(ioctl(d->cdda_fd,SG_GET_RESERVED_SIZE,&reserved)){ /* Up, guess not. */ -@@ -31,6 +33,10 @@ static void tweak_SG_buffer(cdrom_drive +@@ -31,6 +35,10 @@ static void tweak_SG_buffer(cdrom_drive } if(ioctl(d->cdda_fd,SG_GET_SG_TABLESIZE,&table))table=1; @@ -22,7 +31,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ { int cur; -@@ -53,14 +59,24 @@ static void tweak_SG_buffer(cdrom_drive +@@ -53,14 +61,24 @@ static void tweak_SG_buffer(cdrom_drive cdmessage(d,buffer); } @@ -48,7 +57,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ static void reset_scsi(cdrom_drive *d){ int arg; d->enable_cdda(d,0); -@@ -74,6 +90,44 @@ static void reset_scsi(cdrom_drive *d){ +@@ -74,6 +92,44 @@ static void reset_scsi(cdrom_drive *d){ d->enable_cdda(d,1); } @@ -93,7 +102,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ static void clear_garbage(cdrom_drive *d){ fd_set fdset; struct timeval tv; -@@ -104,21 +158,30 @@ static void clear_garbage(cdrom_drive *d +@@ -104,21 +160,30 @@ static void clear_garbage(cdrom_drive *d flag=1; } } @@ -125,7 +134,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ /* clear out any possibly preexisting garbage */ clear_garbage(d); -@@ -224,11 +287,53 @@ static int handle_scsi_cmd(cdrom_drive * +@@ -224,11 +289,53 @@ static int handle_scsi_cmd(cdrom_drive * if(errno==0)errno=EIO; return(TR_EREAD); } @@ -180,7 +189,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ switch(key){ case 0: if(errno==0)errno=EIO; -@@ -266,9 +371,20 @@ static int handle_scsi_cmd(cdrom_drive * +@@ -266,9 +373,20 @@ static int handle_scsi_cmd(cdrom_drive * commands still get through. Perhaps no data comes back even though the target reports success? */ @@ -202,7 +211,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ if(d->sg_buffer[i]!=bytefill){ flag=1; break; -@@ -284,6 +400,83 @@ static int handle_scsi_cmd(cdrom_drive * +@@ -284,6 +402,83 @@ static int handle_scsi_cmd(cdrom_drive * return(0); } @@ -286,7 +295,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ /* Group 1 (10b) command */ static int mode_sense_atapi(cdrom_drive *d,int size,int page){ -@@ -600,6 +793,23 @@ static int scsi_read_toc2 (cdrom_drive * +@@ -600,6 +795,23 @@ static int scsi_read_toc2 (cdrom_drive * return(tracks); } @@ -310,7 +319,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ /* These do one 'extra' copy in the name of clean code */ static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors){ -@@ -833,30 +1043,59 @@ static long scsi_read_map (cdrom_drive * +@@ -833,30 +1045,59 @@ static long scsi_read_map (cdrom_drive * while(1) { if((err=map(d,(p?buffer:NULL),begin,sectors))){ if(d->report_all){ @@ -371,7 +380,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ } if(!d->error_retry)return(-7); -@@ -1307,22 +1546,45 @@ static void check_fua_bit(cdrom_drive *d +@@ -1307,22 +1548,45 @@ static void check_fua_bit(cdrom_drive *d return; } @@ -419,7 +428,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ d->is_atapi=1; }else{ cdmessage(d,"\tDrive is SCSI\n"); -@@ -1332,6 +1594,46 @@ static int check_atapi(cdrom_drive *d){ +@@ -1332,6 +1596,46 @@ static int check_atapi(cdrom_drive *d){ return(d->is_atapi); } } @@ -466,7 +475,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ static int check_mmc(cdrom_drive *d){ char *b; -@@ -1379,6 +1681,7 @@ static void check_exceptions(cdrom_drive +@@ -1379,6 +1683,7 @@ static void check_exceptions(cdrom_drive } } @@ -474,7 +483,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ /* request vendor brand and model */ unsigned char *scsi_inquiry(cdrom_drive *d){ memcpy(d->sg_buffer,(char[]){ 0x12,0,0,0,56,0},6); -@@ -1389,6 +1692,7 @@ unsigned char *scsi_inquiry(cdrom_drive +@@ -1389,6 +1694,7 @@ unsigned char *scsi_inquiry(cdrom_drive } return (d->sg_buffer); } @@ -482,7 +491,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ int scsi_init_drive(cdrom_drive *d){ -@@ -1434,7 +1738,7 @@ int scsi_init_drive(cdrom_drive *d){ +@@ -1434,7 +1740,7 @@ int scsi_init_drive(cdrom_drive *d){ d->read_toc = (!memcmp(d->drive_model, "IMS", 3) && !d->is_atapi) ? scsi_read_toc2 : scsi_read_toc; @@ -491,7 +500,7 @@ $NetBSD: patch-cg,v 1.8 2006/03/07 06:29:04 joerg Exp $ if(!d->is_atapi){ -@@ -1458,8 +1762,12 @@ int scsi_init_drive(cdrom_drive *d){ +@@ -1458,8 +1764,12 @@ int scsi_init_drive(cdrom_drive *d){ check_fua_bit(d); d->error_retry=1; |