Annotation of /trunk/cdparanoia/patches/cdparanoia-3.9.8-sgio-env.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1770 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1770 byte(s)
-import
1 | niro | 144 | --- cdparanoia-III-alpha9.8/interface/scsi_interface.c.env 2004-09-30 11:36:29.495045730 -0400 |
2 | +++ cdparanoia-III-alpha9.8/interface/scsi_interface.c 2004-09-30 11:35:52.261283378 -0400 | ||
3 | @@ -177,8 +177,11 @@ | ||
4 | * "allocation, so be more conservative: 32kB max until I test more | ||
5 | * thoroughly". We're not currently honoring that, because we should | ||
6 | * always get -ENOMEM. | ||
7 | + * | ||
8 | + * Updated: but we don't always get -ENOMEM. Sometimes USB drives | ||
9 | + * still fail the wrong way. This needs some kernel-land investigation. | ||
10 | */ | ||
11 | -#if 0 | ||
12 | +#if 1 | ||
13 | cur=(cur>1024*32?1024*32:cur); | ||
14 | #endif | ||
15 | d->nsectors=cur/CD_FRAMESIZE_RAW; | ||
16 | --- cdparanoia-III-alpha9.8/interface/scan_devices.c.env 2004-09-30 11:30:55.422135762 -0400 | ||
17 | +++ cdparanoia-III-alpha9.8/interface/scan_devices.c 2004-09-30 11:34:04.815523677 -0400 | ||
18 | @@ -104,6 +104,7 @@ | ||
19 | cdrom_drive *cdda_identify(const char *device, int messagedest,char **messages){ | ||
20 | struct stat st; | ||
21 | cdrom_drive *d=NULL; | ||
22 | + char *transport = getenv("CDDA_TRANSPORT"); | ||
23 | idmessage(messagedest,messages,"Checking %s for cdrom...",device); | ||
24 | |||
25 | if(stat(device,&st)){ | ||
26 | @@ -120,11 +121,15 @@ | ||
27 | #endif | ||
28 | |||
29 | #ifdef SG_IO | ||
30 | - d=cdda_identify_scsi(device,NULL,messagedest,messages); | ||
31 | - if(!d)d=cdda_identify_cooked(device,messagedest,messages); | ||
32 | -#else | ||
33 | - if(!d)d=cdda_identify_scsi(device,NULL,messagedest,messages); | ||
34 | - d=cdda_identify_cooked(device,messagedest,messages); | ||
35 | + if (transport && !strcasecmp(transport, "cooked")) { | ||
36 | +#endif | ||
37 | + d=cdda_identify_cooked(device,messagedest,messages); | ||
38 | + if(!d)d=cdda_identify_scsi(device,NULL,messagedest,messages); | ||
39 | +#ifdef SG_IO | ||
40 | + } else { | ||
41 | + d=cdda_identify_scsi(device,NULL,messagedest,messages); | ||
42 | + if(!d)d=cdda_identify_cooked(device,messagedest,messages); | ||
43 | + } | ||
44 | #endif | ||
45 | |||
46 | #ifdef CDDA_TEST |