1 |
loki_val 08/09/26 07:14:08 |
2 |
|
3 |
Added: cdparanoia-3.10.2-gcc43.patch |
4 |
Log: |
5 |
Fix bug 238378. Thanks to Matthias Liebig <pqGungnir@×××.de> and Ian Abbott <ian@××××××.org>. |
6 |
(Portage version: 2.2_rc9/cvs/Linux 2.6.25.8 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-sound/cdparanoia/files/cdparanoia-3.10.2-gcc43.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/cdparanoia/files/cdparanoia-3.10.2-gcc43.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/cdparanoia/files/cdparanoia-3.10.2-gcc43.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: cdparanoia-3.10.2-gcc43.patch |
15 |
=================================================================== |
16 |
diff -urp cdparanoia-III-10.2.orig/interface/cdda_interface.h cdparanoia-III-10.2/interface/cdda_interface.h |
17 |
--- cdparanoia-III-10.2.orig/interface/cdda_interface.h 2008-09-11 11:43:52.000000000 +0100 |
18 |
+++ cdparanoia-III-10.2/interface/cdda_interface.h 2008-09-25 00:18:02.000000000 +0100 |
19 |
@@ -84,7 +84,7 @@ typedef struct cdrom_drive{ |
20 |
int is_atapi; |
21 |
int is_mmc; |
22 |
|
23 |
- cdda_private_data_t *private; |
24 |
+ cdda_private_data_t *private_data; |
25 |
void *reserved; |
26 |
unsigned char inqbytes[4]; |
27 |
|
28 |
diff -urp cdparanoia-III-10.2.orig/interface/cooked_interface.c cdparanoia-III-10.2/interface/cooked_interface.c |
29 |
--- cdparanoia-III-10.2.orig/interface/cooked_interface.c 2008-08-26 10:55:22.000000000 +0100 |
30 |
+++ cdparanoia-III-10.2/interface/cooked_interface.c 2008-09-25 00:19:21.000000000 +0100 |
31 |
@@ -13,13 +13,13 @@ |
32 |
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ |
33 |
struct timespec tv1; |
34 |
struct timespec tv2; |
35 |
- int ret1=clock_gettime(d->private->clock,&tv1); |
36 |
+ int ret1=clock_gettime(d->private_data->clock,&tv1); |
37 |
int ret2=ioctl(fd, command,arg); |
38 |
- int ret3=clock_gettime(d->private->clock,&tv2); |
39 |
+ int ret3=clock_gettime(d->private_data->clock,&tv2); |
40 |
if(ret1<0 || ret3<0){ |
41 |
- d->private->last_milliseconds=-1; |
42 |
+ d->private_data->last_milliseconds=-1; |
43 |
}else{ |
44 |
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; |
45 |
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; |
46 |
} |
47 |
return ret2; |
48 |
} |
49 |
diff -urp cdparanoia-III-10.2.orig/interface/interface.c cdparanoia-III-10.2/interface/interface.c |
50 |
--- cdparanoia-III-10.2.orig/interface/interface.c 2008-09-11 11:43:52.000000000 +0100 |
51 |
+++ cdparanoia-III-10.2/interface/interface.c 2008-09-25 00:19:47.000000000 +0100 |
52 |
@@ -39,9 +39,9 @@ int cdda_close(cdrom_drive *d){ |
53 |
if(d->drive_model)free(d->drive_model); |
54 |
if(d->cdda_fd!=-1)close(d->cdda_fd); |
55 |
if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd); |
56 |
- if(d->private){ |
57 |
- if(d->private->sg_hd)free(d->private->sg_hd); |
58 |
- free(d->private); |
59 |
+ if(d->private_data){ |
60 |
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd); |
61 |
+ free(d->private_data); |
62 |
} |
63 |
|
64 |
free(d); |
65 |
@@ -127,7 +127,7 @@ long cdda_read_timed(cdrom_drive *d, voi |
66 |
} |
67 |
} |
68 |
} |
69 |
- if(ms)*ms=d->private->last_milliseconds; |
70 |
+ if(ms)*ms=d->private_data->last_milliseconds; |
71 |
return(sectors); |
72 |
} |
73 |
|
74 |
diff -urp cdparanoia-III-10.2.orig/interface/scan_devices.c cdparanoia-III-10.2/interface/scan_devices.c |
75 |
--- cdparanoia-III-10.2.orig/interface/scan_devices.c 2008-08-26 10:55:22.000000000 +0100 |
76 |
+++ cdparanoia-III-10.2/interface/scan_devices.c 2008-09-25 00:20:35.000000000 +0100 |
77 |
@@ -264,11 +264,11 @@ cdrom_drive *cdda_identify_cooked(const |
78 |
d->interface=COOKED_IOCTL; |
79 |
d->bigendianp=-1; /* We don't know yet... */ |
80 |
d->nsectors=-1; |
81 |
- d->private=calloc(1,sizeof(*d->private)); |
82 |
+ d->private_data=calloc(1,sizeof(*d->private_data)); |
83 |
{ |
84 |
/* goddamnit */ |
85 |
struct timespec tv; |
86 |
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); |
87 |
+ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); |
88 |
} |
89 |
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); |
90 |
return(d); |
91 |
@@ -674,15 +674,15 @@ cdrom_drive *cdda_identify_scsi(const ch |
92 |
d->bigendianp=-1; /* We don't know yet... */ |
93 |
d->nsectors=-1; |
94 |
d->messagedest = messagedest; |
95 |
- d->private=calloc(1,sizeof(*d->private)); |
96 |
+ d->private_data=calloc(1,sizeof(*d->private_data)); |
97 |
{ |
98 |
/* goddamnit */ |
99 |
struct timespec tv; |
100 |
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); |
101 |
+ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); |
102 |
} |
103 |
if(use_sgio){ |
104 |
d->interface=SGIO_SCSI; |
105 |
- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); |
106 |
+ d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); |
107 |
g_fd=d->cdda_fd=dup(d->ioctl_fd); |
108 |
}else{ |
109 |
version=verify_SG_version(d,messagedest,messages); |
110 |
@@ -696,8 +696,8 @@ cdrom_drive *cdda_identify_scsi(const ch |
111 |
} |
112 |
|
113 |
/* malloc our big buffer for scsi commands */ |
114 |
- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); |
115 |
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; |
116 |
+ d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE); |
117 |
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; |
118 |
} |
119 |
|
120 |
{ |
121 |
@@ -772,9 +772,9 @@ cdda_identify_scsi_fail: |
122 |
if(i_fd!=-1)close(i_fd); |
123 |
if(g_fd!=-1)close(g_fd); |
124 |
if(d){ |
125 |
- if(d->private){ |
126 |
- if(d->private->sg_hd)free(d->private->sg_hd); |
127 |
- free(d->private); |
128 |
+ if(d->private_data){ |
129 |
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd); |
130 |
+ free(d->private_data); |
131 |
} |
132 |
free(d); |
133 |
} |
134 |
@@ -821,7 +821,7 @@ cdrom_drive *cdda_identify_test(const ch |
135 |
d->interface=TEST_INTERFACE; |
136 |
d->bigendianp=-1; /* We don't know yet... */ |
137 |
d->nsectors=-1; |
138 |
- d->private=calloc(1,sizeof(*d->private)); |
139 |
+ d->private_data=calloc(1,sizeof(*d->private_data)); |
140 |
d->drive_model=copystring("File based test interface"); |
141 |
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model); |
142 |
|
143 |
diff -urp cdparanoia-III-10.2.orig/interface/scsi_interface.c cdparanoia-III-10.2/interface/scsi_interface.c |
144 |
--- cdparanoia-III-10.2.orig/interface/scsi_interface.c 2008-09-11 21:33:30.000000000 +0100 |
145 |
+++ cdparanoia-III-10.2/interface/scsi_interface.c 2008-09-25 00:22:40.000000000 +0100 |
146 |
@@ -15,13 +15,13 @@ |
147 |
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ |
148 |
struct timespec tv1; |
149 |
struct timespec tv2; |
150 |
- int ret1=clock_gettime(d->private->clock,&tv1); |
151 |
+ int ret1=clock_gettime(d->private_data->clock,&tv1); |
152 |
int ret2=ioctl(fd, command,arg); |
153 |
- int ret3=clock_gettime(d->private->clock,&tv2); |
154 |
+ int ret3=clock_gettime(d->private_data->clock,&tv2); |
155 |
if(ret1<0 || ret3<0){ |
156 |
- d->private->last_milliseconds=-1; |
157 |
+ d->private_data->last_milliseconds=-1; |
158 |
}else{ |
159 |
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; |
160 |
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; |
161 |
} |
162 |
return ret2; |
163 |
} |
164 |
@@ -96,7 +96,7 @@ static void tweak_SG_buffer(cdrom_drive |
165 |
static void clear_garbage(cdrom_drive *d){ |
166 |
fd_set fdset; |
167 |
struct timeval tv; |
168 |
- struct sg_header *sg_hd=d->private->sg_hd; |
169 |
+ struct sg_header *sg_hd=d->private_data->sg_hd; |
170 |
int flag=0; |
171 |
|
172 |
/* clear out any possibly preexisting garbage */ |
173 |
@@ -185,7 +185,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
174 |
struct timespec tv2; |
175 |
int tret1,tret2; |
176 |
int status = 0; |
177 |
- struct sg_header *sg_hd=d->private->sg_hd; |
178 |
+ struct sg_header *sg_hd=d->private_data->sg_hd; |
179 |
long writebytes=SG_OFF+cmd_len+in_size; |
180 |
|
181 |
/* generic scsi device services */ |
182 |
@@ -195,7 +195,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
183 |
|
184 |
memset(sg_hd,0,sizeof(sg_hd)); |
185 |
memset(sense_buffer,0,SG_MAX_SENSE); |
186 |
- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size); |
187 |
+ memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size); |
188 |
sg_hd->twelve_byte = cmd_len == 12; |
189 |
sg_hd->result = 0; |
190 |
sg_hd->reply_len = SG_OFF + out_size; |
191 |
@@ -209,7 +209,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
192 |
tell if the command failed. Scared yet? */ |
193 |
|
194 |
if(bytecheck && out_size>in_size){ |
195 |
- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); |
196 |
+ memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); |
197 |
/* the size does not remove cmd_len due to the way the kernel |
198 |
driver copies buffers */ |
199 |
writebytes+=(out_size-in_size); |
200 |
@@ -243,7 +243,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
201 |
} |
202 |
|
203 |
sigprocmask (SIG_BLOCK, &(d->sigset), NULL ); |
204 |
- tret1=clock_gettime(d->private->clock,&tv1); |
205 |
+ tret1=clock_gettime(d->private_data->clock,&tv1); |
206 |
errno=0; |
207 |
status = write(d->cdda_fd, sg_hd, writebytes ); |
208 |
|
209 |
@@ -289,7 +289,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
210 |
} |
211 |
} |
212 |
|
213 |
- tret2=clock_gettime(d->private->clock,&tv2); |
214 |
+ tret2=clock_gettime(d->private_data->clock,&tv2); |
215 |
errno=0; |
216 |
status = read(d->cdda_fd, sg_hd, SG_OFF + out_size); |
217 |
sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL ); |
218 |
@@ -313,7 +313,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
219 |
if(bytecheck && in_size+cmd_len<out_size){ |
220 |
long i,flag=0; |
221 |
for(i=in_size;i<out_size;i++) |
222 |
- if(d->private->sg_buffer[i]!=bytefill){ |
223 |
+ if(d->private_data->sg_buffer[i]!=bytefill){ |
224 |
flag=1; |
225 |
break; |
226 |
} |
227 |
@@ -326,9 +326,9 @@ static int sg2_handle_scsi_cmd(cdrom_dri |
228 |
|
229 |
errno=0; |
230 |
if(tret1<0 || tret2<0){ |
231 |
- d->private->last_milliseconds=-1; |
232 |
+ d->private_data->last_milliseconds=-1; |
233 |
}else{ |
234 |
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; |
235 |
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; |
236 |
} |
237 |
return(0); |
238 |
} |
239 |
@@ -347,7 +347,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr |
240 |
|
241 |
memset(&hdr,0,sizeof(hdr)); |
242 |
memset(sense,0,sizeof(sense)); |
243 |
- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size); |
244 |
+ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size); |
245 |
|
246 |
hdr.cmdp = cmd; |
247 |
hdr.cmd_len = cmd_len; |
248 |
@@ -355,7 +355,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr |
249 |
hdr.mx_sb_len = SG_MAX_SENSE; |
250 |
hdr.timeout = 50000; |
251 |
hdr.interface_id = 'S'; |
252 |
- hdr.dxferp = d->private->sg_buffer; |
253 |
+ hdr.dxferp = d->private_data->sg_buffer; |
254 |
hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */ |
255 |
|
256 |
/* scary buffer fill hack */ |
257 |
@@ -400,7 +400,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr |
258 |
if(bytecheck && in_size<out_size){ |
259 |
long i,flag=0; |
260 |
for(i=in_size;i<out_size;i++) |
261 |
- if(d->private->sg_buffer[i]!=bytefill){ |
262 |
+ if(d->private_data->sg_buffer[i]!=bytefill){ |
263 |
flag=1; |
264 |
break; |
265 |
} |
266 |
@@ -412,7 +412,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr |
267 |
} |
268 |
|
269 |
/* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */ |
270 |
- /* d->private->last_milliseconds = hdr.duration; */ |
271 |
+ /* d->private_data->last_milliseconds = hdr.duration; */ |
272 |
|
273 |
errno = 0; |
274 |
return 0; |
275 |
@@ -445,9 +445,9 @@ static int test_unit_ready(cdrom_drive * |
276 |
|
277 |
handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense); |
278 |
|
279 |
- key = d->private->sg_buffer[2] & 0xf; |
280 |
- ASC = d->private->sg_buffer[12]; |
281 |
- ASCQ = d->private->sg_buffer[13]; |
282 |
+ key = d->private_data->sg_buffer[2] & 0xf; |
283 |
+ ASC = d->private_data->sg_buffer[12]; |
284 |
+ ASCQ = d->private_data->sg_buffer[13]; |
285 |
|
286 |
if(key == 2 && ASC == 4 && ASCQ == 1) return 0; |
287 |
return 1; |
288 |
@@ -492,7 +492,7 @@ static int mode_sense_atapi(cdrom_drive |
289 |
if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1); |
290 |
|
291 |
{ |
292 |
- unsigned char *b=d->private->sg_buffer; |
293 |
+ unsigned char *b=d->private_data->sg_buffer; |
294 |
if(b[0])return(1); /* Handles only up to 256 bytes */ |
295 |
if(b[6])return(1); /* Handles only up to 256 bytes */ |
296 |
|
297 |
@@ -604,8 +604,8 @@ static int mode_select(cdrom_drive *d,in |
298 |
static unsigned int get_orig_sectorsize(cdrom_drive *d){ |
299 |
if(mode_sense(d,12,0x01))return(-1); |
300 |
|
301 |
- d->orgdens = d->private->sg_buffer[4]; |
302 |
- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]); |
303 |
+ d->orgdens = d->private_data->sg_buffer[4]; |
304 |
+ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]); |
305 |
} |
306 |
|
307 |
/* switch CDROM scsi drives to given sector size */ |
308 |
@@ -664,8 +664,8 @@ static int scsi_read_toc (cdrom_drive *d |
309 |
return(-4); |
310 |
} |
311 |
|
312 |
- first=d->private->sg_buffer[2]; |
313 |
- last=d->private->sg_buffer[3]; |
314 |
+ first=d->private_data->sg_buffer[2]; |
315 |
+ last=d->private_data->sg_buffer[3]; |
316 |
tracks=last-first+1; |
317 |
|
318 |
if (last > MAXTRK || first > MAXTRK || last<0 || first<0) { |
319 |
@@ -683,7 +683,7 @@ static int scsi_read_toc (cdrom_drive *d |
320 |
return(-5); |
321 |
} |
322 |
{ |
323 |
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); |
324 |
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); |
325 |
|
326 |
d->disc_toc[i-first].bFlags=toc->bFlags; |
327 |
d->disc_toc[i-first].bTrack=i; |
328 |
@@ -704,7 +704,7 @@ static int scsi_read_toc (cdrom_drive *d |
329 |
return(-2); |
330 |
} |
331 |
{ |
332 |
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); |
333 |
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); |
334 |
|
335 |
d->disc_toc[i-first].bFlags=toc->bFlags; |
336 |
d->disc_toc[i-first].bTrack=0xAA; |
337 |
@@ -738,7 +738,7 @@ static int scsi_read_toc2 (cdrom_drive * |
338 |
} |
339 |
|
340 |
/* copy to our structure and convert start sector */ |
341 |
- tracks = d->private->sg_buffer[1]; |
342 |
+ tracks = d->private_data->sg_buffer[1]; |
343 |
if (tracks > MAXTRK) { |
344 |
cderror(d,"003: CDROM reporting illegal number of tracks\n"); |
345 |
return(-3); |
346 |
@@ -754,33 +754,33 @@ static int scsi_read_toc2 (cdrom_drive * |
347 |
return(-5); |
348 |
} |
349 |
|
350 |
- d->disc_toc[i].bFlags = d->private->sg_buffer[10]; |
351 |
+ d->disc_toc[i].bFlags = d->private_data->sg_buffer[10]; |
352 |
d->disc_toc[i].bTrack = i + 1; |
353 |
|
354 |
d->disc_toc[i].dwStartSector= d->adjust_ssize * |
355 |
- (((signed char)(d->private->sg_buffer[2])<<24) | |
356 |
- (d->private->sg_buffer[3]<<16)| |
357 |
- (d->private->sg_buffer[4]<<8)| |
358 |
- (d->private->sg_buffer[5])); |
359 |
+ (((signed char)(d->private_data->sg_buffer[2])<<24) | |
360 |
+ (d->private_data->sg_buffer[3]<<16)| |
361 |
+ (d->private_data->sg_buffer[4]<<8)| |
362 |
+ (d->private_data->sg_buffer[5])); |
363 |
} |
364 |
|
365 |
d->disc_toc[i].bFlags = 0; |
366 |
d->disc_toc[i].bTrack = i + 1; |
367 |
- memcpy (&foo, d->private->sg_buffer+2, 4); |
368 |
- memcpy (&bar, d->private->sg_buffer+6, 4); |
369 |
+ memcpy (&foo, d->private_data->sg_buffer+2, 4); |
370 |
+ memcpy (&bar, d->private_data->sg_buffer+6, 4); |
371 |
d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) + |
372 |
be32_to_cpu(bar)); |
373 |
|
374 |
d->disc_toc[i].dwStartSector= d->adjust_ssize * |
375 |
- ((((signed char)(d->private->sg_buffer[2])<<24) | |
376 |
- (d->private->sg_buffer[3]<<16)| |
377 |
- (d->private->sg_buffer[4]<<8)| |
378 |
- (d->private->sg_buffer[5]))+ |
379 |
+ ((((signed char)(d->private_data->sg_buffer[2])<<24) | |
380 |
+ (d->private_data->sg_buffer[3]<<16)| |
381 |
+ (d->private_data->sg_buffer[4]<<8)| |
382 |
+ (d->private_data->sg_buffer[5]))+ |
383 |
|
384 |
- ((((signed char)(d->private->sg_buffer[6])<<24) | |
385 |
- (d->private->sg_buffer[7]<<16)| |
386 |
- (d->private->sg_buffer[8]<<8)| |
387 |
- (d->private->sg_buffer[9])))); |
388 |
+ ((((signed char)(d->private_data->sg_buffer[6])<<24) | |
389 |
+ (d->private_data->sg_buffer[7]<<16)| |
390 |
+ (d->private_data->sg_buffer[8]<<8)| |
391 |
+ (d->private_data->sg_buffer[9])))); |
392 |
|
393 |
|
394 |
d->cd_extra = FixupTOC(d,tracks+1); |
395 |
@@ -817,7 +817,7 @@ static int i_read_28 (cdrom_drive *d, vo |
396 |
cmd[8] = sectors; |
397 |
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
398 |
return(ret); |
399 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
400 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
401 |
return(0); |
402 |
} |
403 |
|
404 |
@@ -836,7 +836,7 @@ static int i_read_A8 (cdrom_drive *d, vo |
405 |
cmd[9] = sectors; |
406 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
407 |
return(ret); |
408 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
409 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
410 |
return(0); |
411 |
} |
412 |
|
413 |
@@ -854,7 +854,7 @@ static int i_read_D4_10 (cdrom_drive *d, |
414 |
cmd[8] = sectors; |
415 |
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
416 |
return(ret); |
417 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
418 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
419 |
return(0); |
420 |
} |
421 |
|
422 |
@@ -872,7 +872,7 @@ static int i_read_D4_12 (cdrom_drive *d, |
423 |
cmd[9] = sectors; |
424 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
425 |
return(ret); |
426 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
427 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
428 |
return(0); |
429 |
} |
430 |
|
431 |
@@ -890,7 +890,7 @@ static int i_read_D5 (cdrom_drive *d, vo |
432 |
cmd[8] = sectors; |
433 |
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
434 |
return(ret); |
435 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
436 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
437 |
return(0); |
438 |
} |
439 |
|
440 |
@@ -908,7 +908,7 @@ static int i_read_D8 (cdrom_drive *d, vo |
441 |
cmd[9] = sectors; |
442 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
443 |
return(ret); |
444 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
445 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
446 |
return(0); |
447 |
} |
448 |
|
449 |
@@ -922,7 +922,7 @@ static int i_read_mmc (cdrom_drive *d, v |
450 |
cmd[8] = sectors; |
451 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
452 |
return(ret); |
453 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
454 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
455 |
return(0); |
456 |
} |
457 |
|
458 |
@@ -936,7 +936,7 @@ static int i_read_mmcB (cdrom_drive *d, |
459 |
cmd[8] = sectors; |
460 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
461 |
return(ret); |
462 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
463 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
464 |
return(0); |
465 |
} |
466 |
|
467 |
@@ -950,7 +950,7 @@ static int i_read_mmc2 (cdrom_drive *d, |
468 |
cmd[8] = sectors; |
469 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
470 |
return(ret); |
471 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
472 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
473 |
return(0); |
474 |
} |
475 |
|
476 |
@@ -964,7 +964,7 @@ static int i_read_mmc2B (cdrom_drive *d, |
477 |
cmd[8] = sectors; |
478 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
479 |
return(ret); |
480 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
481 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
482 |
return(0); |
483 |
} |
484 |
|
485 |
@@ -978,7 +978,7 @@ static int i_read_mmc3 (cdrom_drive *d, |
486 |
cmd[8] = sectors; |
487 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
488 |
return(ret); |
489 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
490 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
491 |
return(0); |
492 |
} |
493 |
|
494 |
@@ -992,7 +992,7 @@ static int i_read_mmc3B (cdrom_drive *d, |
495 |
cmd[8] = sectors; |
496 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
497 |
return(ret); |
498 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
499 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
500 |
return(0); |
501 |
} |
502 |
|
503 |
@@ -1026,7 +1026,7 @@ static int i_read_msf (cdrom_drive *d, v |
504 |
|
505 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
506 |
return(ret); |
507 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
508 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
509 |
return(0); |
510 |
} |
511 |
|
512 |
@@ -1039,7 +1039,7 @@ static int i_read_msf2 (cdrom_drive *d, |
513 |
|
514 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
515 |
return(ret); |
516 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
517 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
518 |
return(0); |
519 |
} |
520 |
|
521 |
@@ -1052,7 +1052,7 @@ static int i_read_msf3 (cdrom_drive *d, |
522 |
|
523 |
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) |
524 |
return(ret); |
525 |
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
526 |
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); |
527 |
return(0); |
528 |
} |
529 |
|
530 |
@@ -1275,7 +1275,7 @@ long scsi_read_msf3 (cdrom_drive *d, voi |
531 |
static int count_2352_bytes(cdrom_drive *d){ |
532 |
long i; |
533 |
for(i=2351;i>=0;i--) |
534 |
- if(d->private->sg_buffer[i]!=(unsigned char)'\177') |
535 |
+ if(d->private_data->sg_buffer[i]!=(unsigned char)'\177') |
536 |
return(((i+3)>>2)<<2); |
537 |
|
538 |
return(0); |
539 |
@@ -1284,7 +1284,7 @@ static int count_2352_bytes(cdrom_drive |
540 |
static int verify_nonzero(cdrom_drive *d){ |
541 |
long i,flag=0; |
542 |
for(i=0;i<2352;i++) |
543 |
- if(d->private->sg_buffer[i]!=0){ |
544 |
+ if(d->private_data->sg_buffer[i]!=0){ |
545 |
flag=1; |
546 |
break; |
547 |
} |
548 |
@@ -1625,7 +1625,7 @@ static int check_mmc(cdrom_drive *d){ |
549 |
d->is_mmc=0; |
550 |
if(mode_sense(d,22,0x2A)==0){ |
551 |
|
552 |
- b=d->private->sg_buffer; |
553 |
+ b=d->private_data->sg_buffer; |
554 |
b+=b[3]+4; |
555 |
|
556 |
if((b[0]&0x3F)==0x2A){ |
557 |
@@ -1673,7 +1673,7 @@ unsigned char *scsi_inquiry(cdrom_drive |
558 |
cderror(d,"008: Unable to identify CDROM model\n"); |
559 |
return(NULL); |
560 |
} |
561 |
- return (d->private->sg_buffer); |
562 |
+ return (d->private_data->sg_buffer); |
563 |
} |
564 |
|
565 |
int scsi_init_drive(cdrom_drive *d){ |
566 |
@@ -1742,8 +1742,8 @@ int scsi_init_drive(cdrom_drive *d){ |
567 |
check_cache(d); |
568 |
|
569 |
d->error_retry=1; |
570 |
- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); |
571 |
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; |
572 |
+ d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); |
573 |
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; |
574 |
d->report_all=1; |
575 |
return(0); |
576 |
} |
577 |
diff -urp cdparanoia-III-10.2.orig/interface/test_interface.c cdparanoia-III-10.2/interface/test_interface.c |
578 |
--- cdparanoia-III-10.2.orig/interface/test_interface.c 2008-09-11 21:33:30.000000000 +0100 |
579 |
+++ cdparanoia-III-10.2/interface/test_interface.c 2008-09-25 00:22:46.000000000 +0100 |
580 |
@@ -66,9 +66,9 @@ static long test_read(cdrom_drive *d, vo |
581 |
if(!fd)fd=fdopen(d->cdda_fd,"r"); |
582 |
|
583 |
if(begin<lastread) |
584 |
- d->private->last_milliseconds=20; |
585 |
+ d->private_data->last_milliseconds=20; |
586 |
else |
587 |
- d->private->last_milliseconds=sectors; |
588 |
+ d->private_data->last_milliseconds=sectors; |
589 |
|
590 |
#ifdef CDDA_TEST_UNDERRUN |
591 |
sectors-=1; |