Ticket #54654: gcc4.3.patch

File gcc4.3.patch, 20.0 KB (added by RichieB2B (Richie B2B), 4 years ago)

Cleaned up version

  • interface/cdda_interface.h

    Author: Monty <paranoia@xiph.org>
    Description:
     Changeset 15338: Commit fix for 'private' becoming a reserved keyword as of
     GCC 4.3+ (Closes: #499676).
    
    diff -u -r cdparanoia-III-10.2/interface/cdda_interface.h cdparanoia-III-10.2-patched/interface/cdda_interface.h
    old new  
    9090  int is_atapi;
    9191  int is_mmc;
    9292
    93   cdda_private_data_t *private;
     93  cdda_private_data_t *private_data;
    9494  void         *reserved;
    9595  unsigned char inqbytes[4];
    9696
  • interface/cooked_interface.c

    Only in cdparanoia-III-10.2-patched/interface: cdda_interface.h.orig
    diff -u -r cdparanoia-III-10.2/interface/cooked_interface.c cdparanoia-III-10.2-patched/interface/cooked_interface.c
    old new  
    1515static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
    1616  struct timespec tv1;
    1717  struct timespec tv2;
    18   int ret1=clock_gettime(d->private->clock,&tv1);
     18  int ret1=clock_gettime(d->private_data->clock,&tv1);
    1919  int ret2=ioctl(fd, command,arg);
    20   int ret3=clock_gettime(d->private->clock,&tv2);
     20  int ret3=clock_gettime(d->private_data->clock,&tv2);
    2121  if(ret1<0 || ret3<0){
    22     d->private->last_milliseconds=-1;
     22    d->private_data->last_milliseconds=-1;
    2323  }else{
    24     d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
     24    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
    2525  }
    2626  return ret2;
    2727}
  • interface/interface.c

    Only in cdparanoia-III-10.2-patched/interface: cooked_interface.c.orig
    diff -u -r cdparanoia-III-10.2/interface/interface.c cdparanoia-III-10.2-patched/interface/interface.c
    old new  
    4242    if(d->cdda_fd!=-1)close(d->cdda_fd);
    4343    if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
    4444#ifndef __APPLE__
    45     if(d->private){
    46       if(d->private->sg_hd)free(d->private->sg_hd);
    47       free(d->private);
     45    if(d->private_data){
     46      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
     47      free(d->private_data);
    4848    }
    4949#endif
    5050
     
    139139      }
    140140    }
    141141#ifndef __APPLE__
    142     if(ms)*ms=d->private->last_milliseconds;
     142    if(ms)*ms=d->private_data->last_milliseconds;
    143143#endif
    144144    return(sectors);
    145145  }
  • interface/scan_devices.c

    Only in cdparanoia-III-10.2-patched/interface: interface.c.orig
    diff -u -r cdparanoia-III-10.2/interface/scan_devices.c cdparanoia-III-10.2-patched/interface/scan_devices.c
    old new  
    276276  d->interface=COOKED_IOCTL;
    277277  d->bigendianp=-1; /* We don't know yet... */
    278278  d->nsectors=-1;
    279   d->private=calloc(1,sizeof(*d->private));
     279  d->private_data=calloc(1,sizeof(*d->private_data));
    280280  {
    281281    /* goddamnit */
    282282    struct timespec tv;
    283     d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
     283    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
    284284  }
    285285  idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
    286286  return(d);
     
    686686  d->bigendianp=-1; /* We don't know yet... */
    687687  d->nsectors=-1;
    688688  d->messagedest = messagedest;
    689   d->private=calloc(1,sizeof(*d->private));
     689  d->private_data=calloc(1,sizeof(*d->private_data));
    690690  {
    691691    /* goddamnit */
    692692    struct timespec tv;
    693     d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
     693    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
    694694  }
    695695  if(use_sgio){
    696696    d->interface=SGIO_SCSI;
    697     d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
     697    d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
    698698    g_fd=d->cdda_fd=dup(d->ioctl_fd);
    699699  }else{
    700700    version=verify_SG_version(d,messagedest,messages);
     
    708708    }
    709709
    710710    /* malloc our big buffer for scsi commands */
    711     d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
    712     d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
     711    d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
     712    d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
    713713  }
    714714
    715715  {
     
    784784  if(i_fd!=-1)close(i_fd);
    785785  if(g_fd!=-1)close(g_fd);
    786786  if(d){
    787     if(d->private){
    788       if(d->private->sg_hd)free(d->private->sg_hd);
    789       free(d->private);
     787    if(d->private_data){
     788      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
     789      free(d->private_data);
    790790    }
    791791    free(d);
    792792  }
     
    835835  d->interface=TEST_INTERFACE;
    836836  d->bigendianp=-1; /* We don't know yet... */
    837837  d->nsectors=-1;
    838   d->private=calloc(1,sizeof(*d->private));
     838  d->private_data=calloc(1,sizeof(*d->private_data));
    839839  d->drive_model=copystring("File based test interface");
    840840  idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
    841841 
  • interface/scsi_interface.c

    Only in cdparanoia-III-10.2-patched/interface: scan_devices.c.orig
    diff -u -r cdparanoia-III-10.2/interface/scsi_interface.c cdparanoia-III-10.2-patched/interface/scsi_interface.c
    old new  
    1717static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
    1818  struct timespec tv1;
    1919  struct timespec tv2;
    20   int ret1=clock_gettime(d->private->clock,&tv1);
     20  int ret1=clock_gettime(d->private_data->clock,&tv1);
    2121  int ret2=ioctl(fd, command,arg);
    22   int ret3=clock_gettime(d->private->clock,&tv2);
     22  int ret3=clock_gettime(d->private_data->clock,&tv2);
    2323  if(ret1<0 || ret3<0){
    24     d->private->last_milliseconds=-1;
     24    d->private_data->last_milliseconds=-1;
    2525  }else{
    26     d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
     26    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
    2727  }
    2828  return ret2;
    2929}
     
    9898static void clear_garbage(cdrom_drive *d){
    9999  fd_set fdset;
    100100  struct timeval tv;
    101   struct sg_header *sg_hd=d->private->sg_hd;
     101  struct sg_header *sg_hd=d->private_data->sg_hd;
    102102  int flag=0;
    103103
    104104  /* clear out any possibly preexisting garbage */
     
    187187  struct timespec tv2;
    188188  int tret1,tret2;
    189189  int status = 0;
    190   struct sg_header *sg_hd=d->private->sg_hd;
     190  struct sg_header *sg_hd=d->private_data->sg_hd;
    191191  long writebytes=SG_OFF+cmd_len+in_size;
    192192
    193193  /* generic scsi device services */
     
    197197
    198198  memset(sg_hd,0,sizeof(sg_hd));
    199199  memset(sense_buffer,0,SG_MAX_SENSE);
    200   memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
     200  memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size);
    201201  sg_hd->twelve_byte = cmd_len == 12;
    202202  sg_hd->result = 0;
    203203  sg_hd->reply_len = SG_OFF + out_size;
     
    211211     tell if the command failed.  Scared yet? */
    212212
    213213  if(bytecheck && out_size>in_size){
    214     memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
     214    memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
    215215    /* the size does not remove cmd_len due to the way the kernel
    216216       driver copies buffers */
    217217    writebytes+=(out_size-in_size);
     
    245245  }
    246246
    247247  sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
    248   tret1=clock_gettime(d->private->clock,&tv1); 
     248  tret1=clock_gettime(d->private_data->clock,&tv1);
    249249  errno=0;
    250250  status = write(d->cdda_fd, sg_hd, writebytes );
    251251
     
    291291    }
    292292  }
    293293
    294   tret2=clock_gettime(d->private->clock,&tv2); 
     294  tret2=clock_gettime(d->private_data->clock,&tv2);
    295295  errno=0;
    296296  status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
    297297  sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
     
    315315  if(bytecheck && in_size+cmd_len<out_size){
    316316    long i,flag=0;
    317317    for(i=in_size;i<out_size;i++)
    318       if(d->private->sg_buffer[i]!=bytefill){
     318      if(d->private_data->sg_buffer[i]!=bytefill){
    319319        flag=1;
    320320        break;
    321321      }
     
    328328
    329329  errno=0;
    330330  if(tret1<0 || tret2<0){
    331     d->private->last_milliseconds=-1;
     331    d->private_data->last_milliseconds=-1;
    332332  }else{
    333     d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
     333    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
    334334  }
    335335  return(0);
    336336}
     
    349349
    350350  memset(&hdr,0,sizeof(hdr));
    351351  memset(sense,0,sizeof(sense));
    352   memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
     352  memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
    353353
    354354  hdr.cmdp = cmd;
    355355  hdr.cmd_len = cmd_len;
     
    357357  hdr.mx_sb_len = SG_MAX_SENSE;
    358358  hdr.timeout = 50000;
    359359  hdr.interface_id = 'S';
    360   hdr.dxferp =  d->private->sg_buffer;
     360  hdr.dxferp =  d->private_data->sg_buffer;
    361361  hdr.flags = SG_FLAG_DIRECT_IO;  /* direct IO if we can get it */
    362362
    363363  /* scary buffer fill hack */
     
    402402  if(bytecheck && in_size<out_size){
    403403    long i,flag=0;
    404404    for(i=in_size;i<out_size;i++)
    405       if(d->private->sg_buffer[i]!=bytefill){
     405      if(d->private_data->sg_buffer[i]!=bytefill){
    406406        flag=1;
    407407        break;
    408408      }
     
    414414  }
    415415
    416416  /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
    417   /* d->private->last_milliseconds = hdr.duration; */
     417  /* d->private_data->last_milliseconds = hdr.duration; */
    418418
    419419  errno = 0;
    420420  return 0;
     
    447447
    448448  handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
    449449
    450   key = d->private->sg_buffer[2] & 0xf;
    451   ASC = d->private->sg_buffer[12];
    452   ASCQ = d->private->sg_buffer[13];
     450  key = d->private_data->sg_buffer[2] & 0xf;
     451  ASC = d->private_data->sg_buffer[12];
     452  ASCQ = d->private_data->sg_buffer[13];
    453453 
    454454  if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
    455455  return 1;
     
    494494  if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
    495495
    496496  {
    497     unsigned char *b=d->private->sg_buffer;
     497    unsigned char *b=d->private_data->sg_buffer;
    498498    if(b[0])return(1); /* Handles only up to 256 bytes */
    499499    if(b[6])return(1); /* Handles only up to 256 bytes */
    500500
     
    606606static unsigned int get_orig_sectorsize(cdrom_drive *d){
    607607  if(mode_sense(d,12,0x01))return(-1);
    608608
    609   d->orgdens = d->private->sg_buffer[4];
    610   return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
     609  d->orgdens = d->private_data->sg_buffer[4];
     610  return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
    611611}
    612612
    613613/* switch CDROM scsi drives to given sector size  */
     
    666666    return(-4);
    667667  }
    668668
    669   first=d->private->sg_buffer[2];
    670   last=d->private->sg_buffer[3];
     669  first=d->private_data->sg_buffer[2];
     670  last=d->private_data->sg_buffer[3];
    671671  tracks=last-first+1;
    672672
    673673  if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
     
    685685      return(-5);
    686686    }
    687687    {
    688       scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
     688      scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
    689689
    690690      d->disc_toc[i-first].bFlags=toc->bFlags;
    691691      d->disc_toc[i-first].bTrack=i;
     
    706706    return(-2);
    707707  }
    708708  {
    709     scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
     709    scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
    710710   
    711711    d->disc_toc[i-first].bFlags=toc->bFlags;
    712712    d->disc_toc[i-first].bTrack=0xAA;
     
    740740  }
    741741
    742742  /* copy to our structure and convert start sector */
    743   tracks = d->private->sg_buffer[1];
     743  tracks = d->private_data->sg_buffer[1];
    744744  if (tracks > MAXTRK) {
    745745    cderror(d,"003: CDROM reporting illegal number of tracks\n");
    746746    return(-3);
     
    756756      return(-5);
    757757    }
    758758   
    759     d->disc_toc[i].bFlags = d->private->sg_buffer[10];
     759    d->disc_toc[i].bFlags = d->private_data->sg_buffer[10];
    760760    d->disc_toc[i].bTrack = i + 1;
    761761
    762762    d->disc_toc[i].dwStartSector= d->adjust_ssize *
    763         (((signed char)(d->private->sg_buffer[2])<<24) |
    764          (d->private->sg_buffer[3]<<16)|
    765          (d->private->sg_buffer[4]<<8)|
    766          (d->private->sg_buffer[5]));
     763        (((signed char)(d->private_data->sg_buffer[2])<<24) |
     764         (d->private_data->sg_buffer[3]<<16)|
     765         (d->private_data->sg_buffer[4]<<8)|
     766         (d->private_data->sg_buffer[5]));
    767767  }
    768768
    769769  d->disc_toc[i].bFlags = 0;
    770770  d->disc_toc[i].bTrack = i + 1;
    771   memcpy (&foo, d->private->sg_buffer+2, 4);
    772   memcpy (&bar, d->private->sg_buffer+6, 4);
     771  memcpy (&foo, d->private_data->sg_buffer+2, 4);
     772  memcpy (&bar, d->private_data->sg_buffer+6, 4);
    773773  d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
    774774                                                    be32_to_cpu(bar));
    775775
    776776  d->disc_toc[i].dwStartSector= d->adjust_ssize *
    777     ((((signed char)(d->private->sg_buffer[2])<<24) |
    778       (d->private->sg_buffer[3]<<16)|
    779       (d->private->sg_buffer[4]<<8)|
    780       (d->private->sg_buffer[5]))+
     777    ((((signed char)(d->private_data->sg_buffer[2])<<24) |
     778      (d->private_data->sg_buffer[3]<<16)|
     779      (d->private_data->sg_buffer[4]<<8)|
     780      (d->private_data->sg_buffer[5]))+
    781781     
    782      ((((signed char)(d->private->sg_buffer[6])<<24) |
    783        (d->private->sg_buffer[7]<<16)|
    784        (d->private->sg_buffer[8]<<8)|
    785        (d->private->sg_buffer[9]))));
     782     ((((signed char)(d->private_data->sg_buffer[6])<<24) |
     783       (d->private_data->sg_buffer[7]<<16)|
     784       (d->private_data->sg_buffer[8]<<8)|
     785       (d->private_data->sg_buffer[9]))));
    786786
    787787
    788788  d->cd_extra = FixupTOC(d,tracks+1);
     
    819819  cmd[8] = sectors;
    820820  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    821821    return(ret);
    822   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     822  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    823823  return(0);
    824824}
    825825
     
    838838  cmd[9] = sectors;
    839839  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    840840    return(ret);
    841   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     841  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    842842  return(0);
    843843}
    844844
     
    856856  cmd[8] = sectors;
    857857  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    858858    return(ret);
    859   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     859  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    860860  return(0);
    861861}
    862862
     
    874874  cmd[9] = sectors;
    875875  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    876876    return(ret);
    877   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     877  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    878878  return(0);
    879879}
    880880
     
    892892  cmd[8] = sectors;
    893893  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    894894    return(ret);
    895   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     895  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    896896  return(0);
    897897}
    898898
     
    910910  cmd[9] = sectors;
    911911  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    912912    return(ret);
    913   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     913  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    914914  return(0);
    915915}
    916916
     
    924924  cmd[8] = sectors;
    925925  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    926926    return(ret);
    927   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     927  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    928928  return(0);
    929929}
    930930
     
    938938  cmd[8] = sectors;
    939939  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    940940    return(ret);
    941   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     941  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    942942  return(0);
    943943}
    944944
     
    952952  cmd[8] = sectors;
    953953  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    954954    return(ret);
    955   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     955  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    956956  return(0);
    957957}
    958958
     
    966966  cmd[8] = sectors;
    967967  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    968968    return(ret);
    969   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     969  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    970970  return(0);
    971971}
    972972
     
    980980  cmd[8] = sectors;
    981981  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    982982    return(ret);
    983   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     983  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    984984  return(0);
    985985}
    986986
     
    994994  cmd[8] = sectors;
    995995  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    996996    return(ret);
    997   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     997  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    998998  return(0);
    999999}
    10001000
     
    10281028
    10291029  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10301030    return(ret);
    1031   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1031  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10321032  return(0);
    10331033}
    10341034
     
    10411041
    10421042  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10431043    return(ret);
    1044   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1044  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10451045  return(0);
    10461046}
    10471047
     
    10541054 
    10551055  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10561056    return(ret);
    1057   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1057  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10581058  return(0);
    10591059}
    10601060
     
    12771277static int count_2352_bytes(cdrom_drive *d){
    12781278  long i;
    12791279  for(i=2351;i>=0;i--)
    1280     if(d->private->sg_buffer[i]!=(unsigned char)'\177')
     1280    if(d->private_data->sg_buffer[i]!=(unsigned char)'\177')
    12811281      return(((i+3)>>2)<<2);
    12821282
    12831283  return(0);
     
    12861286static int verify_nonzero(cdrom_drive *d){
    12871287  long i,flag=0;
    12881288  for(i=0;i<2352;i++)
    1289     if(d->private->sg_buffer[i]!=0){
     1289    if(d->private_data->sg_buffer[i]!=0){
    12901290      flag=1;
    12911291      break;
    12921292    }
     
    16271627  d->is_mmc=0;
    16281628  if(mode_sense(d,22,0x2A)==0){
    16291629 
    1630     b=d->private->sg_buffer;
     1630    b=d->private_data->sg_buffer;
    16311631    b+=b[3]+4;
    16321632   
    16331633    if((b[0]&0x3F)==0x2A){
     
    16751675    cderror(d,"008: Unable to identify CDROM model\n");
    16761676    return(NULL);
    16771677  }
    1678   return (d->private->sg_buffer);
     1678  return (d->private_data->sg_buffer);
    16791679}
    16801680
    16811681int scsi_init_drive(cdrom_drive *d){
     
    17441744  check_cache(d);
    17451745
    17461746  d->error_retry=1;
    1747   d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
    1748   d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
     1747  d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
     1748  d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
    17491749  d->report_all=1;
    17501750  return(0);
    17511751}
  • interface/test_interface.c

    Only in cdparanoia-III-10.2-patched/interface: scsi_interface.c.orig
    diff -u -r cdparanoia-III-10.2/interface/test_interface.c cdparanoia-III-10.2-patched/interface/test_interface.c
    old new  
    6666  if(!fd)fd=fdopen(d->cdda_fd,"r");
    6767
    6868  if(begin<lastread)
    69     d->private->last_milliseconds=20;
     69    d->private_data->last_milliseconds=20;
    7070  else
    71     d->private->last_milliseconds=sectors;
     71    d->private_data->last_milliseconds=sectors;
    7272
    7373#ifdef CDDA_TEST_UNDERRUN
    7474  sectors-=1;