aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-interface-remove-C-reserved-keyword.patch
blob: a5600a1c3a3081e6e4909af9f28617ef7141ea44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
From 12ea28398f8e5d4a4a23c62d511fc4f53584e51d Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
Date: Tue, 7 Apr 2015 11:07:56 +0200
Subject: [PATCH] interface: remove C++ reserved keyword

Because "private" was used in cdda_interface.h, this header file could not be
compiled in C++.

Upstream-Status: Inappropriate (the upstream project is dead)

Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
---
 interface/cdda_interface.h   |   2 +-
 interface/cooked_interface.c |   8 +--
 interface/interface.c        |   8 +--
 interface/scan_devices.c     |  22 ++++----
 interface/scsi_interface.c   | 128 +++++++++++++++++++++----------------------
 interface/test_interface.c   |   4 +-
 6 files changed, 86 insertions(+), 86 deletions(-)

diff --git a/interface/cdda_interface.h b/interface/cdda_interface.h
index 8487cb7..b738825 100644
--- a/interface/cdda_interface.h
+++ b/interface/cdda_interface.h
@@ -84,7 +84,7 @@ typedef struct cdrom_drive{
   int is_atapi;
   int is_mmc;
 
-  cdda_private_data_t *private;
+  cdda_private_data_t *priv; /* private is a C++ reserved keyword */
   void         *reserved;
   unsigned char inqbytes[4];
 
diff --git a/interface/cooked_interface.c b/interface/cooked_interface.c
index de29055..ea9d0fc 100644
--- a/interface/cooked_interface.c
+++ b/interface/cooked_interface.c
@@ -13,13 +13,13 @@
 static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
   struct timespec tv1;
   struct timespec tv2;
-  int ret1=clock_gettime(d->private->clock,&tv1);
+  int ret1=clock_gettime(d->priv->clock,&tv1);
   int ret2=ioctl(fd, command,arg);
-  int ret3=clock_gettime(d->private->clock,&tv2);
+  int ret3=clock_gettime(d->priv->clock,&tv2);
   if(ret1<0 || ret3<0){
-    d->private->last_milliseconds=-1;
+    d->priv->last_milliseconds=-1;
   }else{
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+    d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
   }
   return ret2;
 }
diff --git a/interface/interface.c b/interface/interface.c
index e8a90cd..526c2a9 100644
--- a/interface/interface.c
+++ b/interface/interface.c
@@ -39,9 +39,9 @@ int cdda_close(cdrom_drive *d){
     if(d->drive_model)free(d->drive_model);
     if(d->cdda_fd!=-1)close(d->cdda_fd);
     if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
-    if(d->private){
-      if(d->private->sg_hd)free(d->private->sg_hd);
-      free(d->private);
+    if(d->priv){
+      if(d->priv->sg_hd)free(d->priv->sg_hd);
+      free(d->priv);
     }
 
     free(d);
@@ -127,7 +127,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector
 	}
       }	
     }
-    if(ms)*ms=d->private->last_milliseconds;
+    if(ms)*ms=d->priv->last_milliseconds;
     return(sectors);
   }
   
diff --git a/interface/scan_devices.c b/interface/scan_devices.c
index fc58110..5f6c4e3 100644
--- a/interface/scan_devices.c
+++ b/interface/scan_devices.c
@@ -264,11 +264,11 @@ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
   d->interface=COOKED_IOCTL;
   d->bigendianp=-1; /* We don't know yet... */
   d->nsectors=-1;
-  d->private=calloc(1,sizeof(*d->private));
+  d->priv=calloc(1,sizeof(*d->priv));
   {
     /* goddamnit */
     struct timespec tv;
-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+    d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
   }
   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
   return(d);
@@ -674,15 +674,15 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device,
   d->bigendianp=-1; /* We don't know yet... */
   d->nsectors=-1;
   d->messagedest = messagedest;
-  d->private=calloc(1,sizeof(*d->private));
+  d->priv=calloc(1,sizeof(*d->priv));
   {
     /* goddamnit */
     struct timespec tv;
-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+    d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
   }
   if(use_sgio){
     d->interface=SGIO_SCSI;
-    d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
+    d->priv->sg_buffer=(unsigned char *)(d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
     g_fd=d->cdda_fd=dup(d->ioctl_fd);
   }else{
     version=verify_SG_version(d,messagedest,messages);
@@ -696,8 +696,8 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device,
     }
 
     /* malloc our big buffer for scsi commands */
-    d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
-    d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+    d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
+    d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF;
   }
 
   {
@@ -772,9 +772,9 @@ cdda_identify_scsi_fail:
   if(i_fd!=-1)close(i_fd);
   if(g_fd!=-1)close(g_fd);
   if(d){
-    if(d->private){
-      if(d->private->sg_hd)free(d->private->sg_hd);
-      free(d->private);
+    if(d->priv){
+      if(d->priv->sg_hd)free(d->priv->sg_hd);
+      free(d->priv);
     }
     free(d);
   }
@@ -821,7 +821,7 @@ cdrom_drive *cdda_identify_test(const char *filename, int messagedest,
   d->interface=TEST_INTERFACE;
   d->bigendianp=-1; /* We don't know yet... */
   d->nsectors=-1;
-  d->private=calloc(1,sizeof(*d->private));
+  d->priv=calloc(1,sizeof(*d->priv));
   d->drive_model=copystring("File based test interface");
   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
   
diff --git a/interface/scsi_interface.c b/interface/scsi_interface.c
index adbb9bf..75d90d4 100644
--- a/interface/scsi_interface.c
+++ b/interface/scsi_interface.c
@@ -15,13 +15,13 @@
 static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
   struct timespec tv1;
   struct timespec tv2;
-  int ret1=clock_gettime(d->private->clock,&tv1);
+  int ret1=clock_gettime(d->priv->clock,&tv1);
   int ret2=ioctl(fd, command,arg);
-  int ret3=clock_gettime(d->private->clock,&tv2);
+  int ret3=clock_gettime(d->priv->clock,&tv2);
   if(ret1<0 || ret3<0){
-    d->private->last_milliseconds=-1;
+    d->priv->last_milliseconds=-1;
   }else{
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+    d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
   }
   return ret2;
 }
@@ -96,7 +96,7 @@ static void tweak_SG_buffer(cdrom_drive *d) {
 static void clear_garbage(cdrom_drive *d){
   fd_set fdset;
   struct timeval tv;
-  struct sg_header *sg_hd=d->private->sg_hd;
+  struct sg_header *sg_hd=d->priv->sg_hd;
   int flag=0;
 
   /* clear out any possibly preexisting garbage */
@@ -185,7 +185,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
   struct timespec tv2;
   int tret1,tret2;
   int status = 0;
-  struct sg_header *sg_hd=d->private->sg_hd;
+  struct sg_header *sg_hd=d->priv->sg_hd;
   long writebytes=SG_OFF+cmd_len+in_size;
 
   /* generic scsi device services */
@@ -195,7 +195,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
 
   memset(sg_hd,0,sizeof(sg_hd)); 
   memset(sense_buffer,0,SG_MAX_SENSE); 
-  memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
+  memcpy(d->priv->sg_buffer,cmd,cmd_len+in_size);
   sg_hd->twelve_byte = cmd_len == 12;
   sg_hd->result = 0;
   sg_hd->reply_len = SG_OFF + out_size;
@@ -209,7 +209,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
      tell if the command failed.  Scared yet? */
 
   if(bytecheck && out_size>in_size){
-    memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
+    memset(d->priv->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
     /* the size does not remove cmd_len due to the way the kernel
        driver copies buffers */
     writebytes+=(out_size-in_size);
@@ -243,7 +243,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
   }
 
   sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
-  tret1=clock_gettime(d->private->clock,&tv1);  
+  tret1=clock_gettime(d->priv->clock,&tv1);  
   errno=0;
   status = write(d->cdda_fd, sg_hd, writebytes );
 
@@ -289,7 +289,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
     }
   }
 
-  tret2=clock_gettime(d->private->clock,&tv2);  
+  tret2=clock_gettime(d->priv->clock,&tv2);  
   errno=0;
   status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
   sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
@@ -313,7 +313,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
   if(bytecheck && in_size+cmd_len<out_size){
     long i,flag=0;
     for(i=in_size;i<out_size;i++)
-      if(d->private->sg_buffer[i]!=bytefill){
+      if(d->priv->sg_buffer[i]!=bytefill){
 	flag=1;
 	break;
       }
@@ -326,9 +326,9 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
 
   errno=0;
   if(tret1<0 || tret2<0){
-    d->private->last_milliseconds=-1;
+    d->priv->last_milliseconds=-1;
   }else{
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
+    d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
   }
   return(0);
 }
@@ -347,7 +347,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
 
   memset(&hdr,0,sizeof(hdr));
   memset(sense,0,sizeof(sense));
-  memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
+  memcpy(d->priv->sg_buffer,cmd+cmd_len,in_size);
 
   hdr.cmdp = cmd;
   hdr.cmd_len = cmd_len;
@@ -355,7 +355,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
   hdr.mx_sb_len = SG_MAX_SENSE;
   hdr.timeout = 50000;
   hdr.interface_id = 'S';
-  hdr.dxferp =  d->private->sg_buffer;
+  hdr.dxferp =  d->priv->sg_buffer;
   hdr.flags = SG_FLAG_DIRECT_IO;  /* direct IO if we can get it */
 
   /* scary buffer fill hack */
@@ -400,7 +400,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
   if(bytecheck && in_size<out_size){
     long i,flag=0;
     for(i=in_size;i<out_size;i++)
-      if(d->private->sg_buffer[i]!=bytefill){
+      if(d->priv->sg_buffer[i]!=bytefill){
 	flag=1;
 	break;
       }
@@ -412,7 +412,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
   }
 
   /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
-  /* d->private->last_milliseconds = hdr.duration; */
+  /* d->priv->last_milliseconds = hdr.duration; */
 
   errno = 0;
   return 0;
@@ -445,9 +445,9 @@ static int test_unit_ready(cdrom_drive *d){
 
   handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
 
-  key = d->private->sg_buffer[2] & 0xf;
-  ASC = d->private->sg_buffer[12];
-  ASCQ = d->private->sg_buffer[13];
+  key = d->priv->sg_buffer[2] & 0xf;
+  ASC = d->priv->sg_buffer[12];
+  ASCQ = d->priv->sg_buffer[13];
   
   if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
   return 1;
@@ -492,7 +492,7 @@ static int mode_sense_atapi(cdrom_drive *d,int size,int page){
   if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
 
   {
-    unsigned char *b=d->private->sg_buffer;
+    unsigned char *b=d->priv->sg_buffer;
     if(b[0])return(1); /* Handles only up to 256 bytes */
     if(b[6])return(1); /* Handles only up to 256 bytes */
 
@@ -604,8 +604,8 @@ static int mode_select(cdrom_drive *d,int density,int secsize){
 static unsigned int get_orig_sectorsize(cdrom_drive *d){
   if(mode_sense(d,12,0x01))return(-1);
 
-  d->orgdens = d->private->sg_buffer[4];
-  return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
+  d->orgdens = d->priv->sg_buffer[4];
+  return(d->orgsize = ((int)(d->priv->sg_buffer[10])<<8)+d->priv->sg_buffer[11]);
 }
 
 /* switch CDROM scsi drives to given sector size  */
@@ -664,8 +664,8 @@ static int scsi_read_toc (cdrom_drive *d){
     return(-4);
   }
 
-  first=d->private->sg_buffer[2];
-  last=d->private->sg_buffer[3];
+  first=d->priv->sg_buffer[2];
+  last=d->priv->sg_buffer[3];
   tracks=last-first+1;
 
   if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
@@ -683,7 +683,7 @@ static int scsi_read_toc (cdrom_drive *d){
       return(-5);
     }
     {
-      scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+      scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4);
 
       d->disc_toc[i-first].bFlags=toc->bFlags;
       d->disc_toc[i-first].bTrack=i;
@@ -704,7 +704,7 @@ static int scsi_read_toc (cdrom_drive *d){
     return(-2);
   }
   {
-    scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+    scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4);
     
     d->disc_toc[i-first].bFlags=toc->bFlags;
     d->disc_toc[i-first].bTrack=0xAA;
@@ -738,7 +738,7 @@ static int scsi_read_toc2 (cdrom_drive *d){
   }
 
   /* copy to our structure and convert start sector */
-  tracks = d->private->sg_buffer[1];
+  tracks = d->priv->sg_buffer[1];
   if (tracks > MAXTRK) {
     cderror(d,"003: CDROM reporting illegal number of tracks\n");
     return(-3);
@@ -754,33 +754,33 @@ static int scsi_read_toc2 (cdrom_drive *d){
       return(-5);
     }
     
-    d->disc_toc[i].bFlags = d->private->sg_buffer[10];
+    d->disc_toc[i].bFlags = d->priv->sg_buffer[10];
     d->disc_toc[i].bTrack = i + 1;
 
     d->disc_toc[i].dwStartSector= d->adjust_ssize * 
-	(((signed char)(d->private->sg_buffer[2])<<24) | 
-	 (d->private->sg_buffer[3]<<16)|
-	 (d->private->sg_buffer[4]<<8)|
-	 (d->private->sg_buffer[5]));
+	(((signed char)(d->priv->sg_buffer[2])<<24) | 
+	 (d->priv->sg_buffer[3]<<16)|
+	 (d->priv->sg_buffer[4]<<8)|
+	 (d->priv->sg_buffer[5]));
   }
 
   d->disc_toc[i].bFlags = 0;
   d->disc_toc[i].bTrack = i + 1;
-  memcpy (&foo, d->private->sg_buffer+2, 4);
-  memcpy (&bar, d->private->sg_buffer+6, 4);
+  memcpy (&foo, d->priv->sg_buffer+2, 4);
+  memcpy (&bar, d->priv->sg_buffer+6, 4);
   d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
 						    be32_to_cpu(bar));
 
   d->disc_toc[i].dwStartSector= d->adjust_ssize * 
-    ((((signed char)(d->private->sg_buffer[2])<<24) | 
-      (d->private->sg_buffer[3]<<16)|
-      (d->private->sg_buffer[4]<<8)|
-      (d->private->sg_buffer[5]))+
+    ((((signed char)(d->priv->sg_buffer[2])<<24) | 
+      (d->priv->sg_buffer[3]<<16)|
+      (d->priv->sg_buffer[4]<<8)|
+      (d->priv->sg_buffer[5]))+
      
-     ((((signed char)(d->private->sg_buffer[6])<<24) | 
-       (d->private->sg_buffer[7]<<16)|
-       (d->private->sg_buffer[8]<<8)|
-       (d->private->sg_buffer[9]))));
+     ((((signed char)(d->priv->sg_buffer[6])<<24) | 
+       (d->priv->sg_buffer[7]<<16)|
+       (d->priv->sg_buffer[8]<<8)|
+       (d->priv->sg_buffer[9]))));
 
 
   d->cd_extra = FixupTOC(d,tracks+1);
@@ -817,7 +817,7 @@ static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -836,7 +836,7 @@ static int i_read_A8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
   cmd[9] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -854,7 +854,7 @@ static int i_read_D4_10 (cdrom_drive *d, void *p, long begin, long sectors, unsi
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -872,7 +872,7 @@ static int i_read_D4_12 (cdrom_drive *d, void *p, long begin, long sectors, unsi
   cmd[9] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -890,7 +890,7 @@ static int i_read_D5 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -908,7 +908,7 @@ static int i_read_D8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
   cmd[9] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -922,7 +922,7 @@ static int i_read_mmc (cdrom_drive *d, void *p, long begin, long sectors, unsign
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -936,7 +936,7 @@ static int i_read_mmcB (cdrom_drive *d, void *p, long begin, long sectors, unsig
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -950,7 +950,7 @@ static int i_read_mmc2 (cdrom_drive *d, void *p, long begin, long sectors, unsig
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -964,7 +964,7 @@ static int i_read_mmc2B (cdrom_drive *d, void *p, long begin, long sectors, unsi
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -978,7 +978,7 @@ static int i_read_mmc3 (cdrom_drive *d, void *p, long begin, long sectors, unsig
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -992,7 +992,7 @@ static int i_read_mmc3B (cdrom_drive *d, void *p, long begin, long sectors, unsi
   cmd[8] = sectors;
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -1026,7 +1026,7 @@ static int i_read_msf (cdrom_drive *d, void *p, long begin, long sectors, unsign
 
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -1039,7 +1039,7 @@ static int i_read_msf2 (cdrom_drive *d, void *p, long begin, long sectors, unsig
 
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -1052,7 +1052,7 @@ static int i_read_msf3 (cdrom_drive *d, void *p, long begin, long sectors, unsig
   
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
     return(ret);
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+  if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
   return(0);
 }
 
@@ -1275,7 +1275,7 @@ long scsi_read_msf3 (cdrom_drive *d, void *p, long begin,
 static int count_2352_bytes(cdrom_drive *d){
   long i;
   for(i=2351;i>=0;i--)
-    if(d->private->sg_buffer[i]!=(unsigned char)'\177')
+    if(d->priv->sg_buffer[i]!=(unsigned char)'\177')
       return(((i+3)>>2)<<2);
 
   return(0);
@@ -1284,7 +1284,7 @@ static int count_2352_bytes(cdrom_drive *d){
 static int verify_nonzero(cdrom_drive *d){
   long i,flag=0;
   for(i=0;i<2352;i++)
-    if(d->private->sg_buffer[i]!=0){
+    if(d->priv->sg_buffer[i]!=0){
       flag=1;
       break;
     }
@@ -1625,7 +1625,7 @@ static int check_mmc(cdrom_drive *d){
   d->is_mmc=0;
   if(mode_sense(d,22,0x2A)==0){
   
-    b=d->private->sg_buffer;
+    b=d->priv->sg_buffer;
     b+=b[3]+4;
     
     if((b[0]&0x3F)==0x2A){
@@ -1673,7 +1673,7 @@ unsigned char *scsi_inquiry(cdrom_drive *d){
     cderror(d,"008: Unable to identify CDROM model\n");
     return(NULL);
   }
-  return (d->private->sg_buffer);
+  return (d->priv->sg_buffer);
 }
 
 int scsi_init_drive(cdrom_drive *d){
@@ -1742,8 +1742,8 @@ int scsi_init_drive(cdrom_drive *d){
   check_cache(d);
 
   d->error_retry=1;
-  d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
-  d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+  d->priv->sg_hd=realloc(d->priv->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+  d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF;
   d->report_all=1;
   return(0);
 }
diff --git a/interface/test_interface.c b/interface/test_interface.c
index 11bec25..e1cefaa 100644
--- a/interface/test_interface.c
+++ b/interface/test_interface.c
@@ -66,9 +66,9 @@ static long test_read(cdrom_drive *d, void *p, long begin, long sectors){
   if(!fd)fd=fdopen(d->cdda_fd,"r");
 
   if(begin<lastread)
-    d->private->last_milliseconds=20;
+    d->priv->last_milliseconds=20;
   else
-    d->private->last_milliseconds=sectors;
+    d->priv->last_milliseconds=sectors;
 
 #ifdef CDDA_TEST_UNDERRUN
   sectors-=1;
-- 
1.9.1