Ticket #54654: 03-gcc4.3.patch

File 03-gcc4.3.patch, 18.3 KB (added by RJVB (René Bertin), 7 years ago)
  • 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).
    
    a b  
    8484  int is_atapi;
    8585  int is_mmc;
    8686
    87   cdda_private_data_t *private;
     87  cdda_private_data_t *private_data;
    8888  void         *reserved;
    8989  unsigned char inqbytes[4];
    9090
  • interface/cooked_interface.c

    a b  
    1313static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
    1414  struct timespec tv1;
    1515  struct timespec tv2;
    16   int ret1=clock_gettime(d->private->clock,&tv1);
     16  int ret1=clock_gettime(d->private_data->clock,&tv1);
    1717  int ret2=ioctl(fd, command,arg);
    18   int ret3=clock_gettime(d->private->clock,&tv2);
     18  int ret3=clock_gettime(d->private_data->clock,&tv2);
    1919  if(ret1<0 || ret3<0){
    20     d->private->last_milliseconds=-1;
     20    d->private_data->last_milliseconds=-1;
    2121  }else{
    22     d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
     22    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
    2323  }
    2424  return ret2;
    2525}
  • interface/interface.c

    a b  
    3939    if(d->drive_model)free(d->drive_model);
    4040    if(d->cdda_fd!=-1)close(d->cdda_fd);
    4141    if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
    42     if(d->private){
    43       if(d->private->sg_hd)free(d->private->sg_hd);
    44       free(d->private);
     42    if(d->private_data){
     43      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
     44      free(d->private_data);
    4545    }
    4646
    4747    free(d);
     
    127127        }
    128128      }
    129129    }
    130     if(ms)*ms=d->private->last_milliseconds;
     130    if(ms)*ms=d->private_data->last_milliseconds;
    131131    return(sectors);
    132132  }
    133133 
  • interface/scan_devices.c

    a b  
    270270  d->interface=COOKED_IOCTL;
    271271  d->bigendianp=-1; /* We don't know yet... */
    272272  d->nsectors=-1;
    273   d->private=calloc(1,sizeof(*d->private));
     273  d->private_data=calloc(1,sizeof(*d->private_data));
    274274  {
    275275    /* goddamnit */
    276276    struct timespec tv;
    277     d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
     277    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
    278278  }
    279279  idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
    280280  return(d);
     
    680680  d->bigendianp=-1; /* We don't know yet... */
    681681  d->nsectors=-1;
    682682  d->messagedest = messagedest;
    683   d->private=calloc(1,sizeof(*d->private));
     683  d->private_data=calloc(1,sizeof(*d->private_data));
    684684  {
    685685    /* goddamnit */
    686686    struct timespec tv;
    687     d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
     687    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
    688688  }
    689689  if(use_sgio){
    690690    d->interface=SGIO_SCSI;
    691     d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
     691    d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
    692692    g_fd=d->cdda_fd=dup(d->ioctl_fd);
    693693  }else{
    694694    version=verify_SG_version(d,messagedest,messages);
     
    702702    }
    703703
    704704    /* malloc our big buffer for scsi commands */
    705     d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
    706     d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
     705    d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
     706    d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
    707707  }
    708708
    709709  {
     
    778778  if(i_fd!=-1)close(i_fd);
    779779  if(g_fd!=-1)close(g_fd);
    780780  if(d){
    781     if(d->private){
    782       if(d->private->sg_hd)free(d->private->sg_hd);
    783       free(d->private);
     781    if(d->private_data){
     782      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
     783      free(d->private_data);
    784784    }
    785785    free(d);
    786786  }
     
    827827  d->interface=TEST_INTERFACE;
    828828  d->bigendianp=-1; /* We don't know yet... */
    829829  d->nsectors=-1;
    830   d->private=calloc(1,sizeof(*d->private));
     830  d->private_data=calloc(1,sizeof(*d->private_data));
    831831  d->drive_model=copystring("File based test interface");
    832832  idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
    833833 
  • interface/scsi_interface.c

    a b  
    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}
     
    9696static void clear_garbage(cdrom_drive *d){
    9797  fd_set fdset;
    9898  struct timeval tv;
    99   struct sg_header *sg_hd=d->private->sg_hd;
     99  struct sg_header *sg_hd=d->private_data->sg_hd;
    100100  int flag=0;
    101101
    102102  /* clear out any possibly preexisting garbage */
     
    185185  struct timespec tv2;
    186186  int tret1,tret2;
    187187  int status = 0;
    188   struct sg_header *sg_hd=d->private->sg_hd;
     188  struct sg_header *sg_hd=d->private_data->sg_hd;
    189189  long writebytes=SG_OFF+cmd_len+in_size;
    190190
    191191  /* generic scsi device services */
     
    195195
    196196  memset(sg_hd,0,sizeof(sg_hd));
    197197  memset(sense_buffer,0,SG_MAX_SENSE);
    198   memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
     198  memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size);
    199199  sg_hd->twelve_byte = cmd_len == 12;
    200200  sg_hd->result = 0;
    201201  sg_hd->reply_len = SG_OFF + out_size;
     
    209209     tell if the command failed.  Scared yet? */
    210210
    211211  if(bytecheck && out_size>in_size){
    212     memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
     212    memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
    213213    /* the size does not remove cmd_len due to the way the kernel
    214214       driver copies buffers */
    215215    writebytes+=(out_size-in_size);
     
    243243  }
    244244
    245245  sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
    246   tret1=clock_gettime(d->private->clock,&tv1); 
     246  tret1=clock_gettime(d->private_data->clock,&tv1);
    247247  errno=0;
    248248  status = write(d->cdda_fd, sg_hd, writebytes );
    249249
     
    289289    }
    290290  }
    291291
    292   tret2=clock_gettime(d->private->clock,&tv2); 
     292  tret2=clock_gettime(d->private_data->clock,&tv2);
    293293  errno=0;
    294294  status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
    295295  sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
     
    313313  if(bytecheck && in_size+cmd_len<out_size){
    314314    long i,flag=0;
    315315    for(i=in_size;i<out_size;i++)
    316       if(d->private->sg_buffer[i]!=bytefill){
     316      if(d->private_data->sg_buffer[i]!=bytefill){
    317317        flag=1;
    318318        break;
    319319      }
     
    326326
    327327  errno=0;
    328328  if(tret1<0 || tret2<0){
    329     d->private->last_milliseconds=-1;
     329    d->private_data->last_milliseconds=-1;
    330330  }else{
    331     d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
     331    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
    332332  }
    333333  return(0);
    334334}
     
    347347
    348348  memset(&hdr,0,sizeof(hdr));
    349349  memset(sense,0,sizeof(sense));
    350   memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
     350  memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
    351351
    352352  hdr.cmdp = cmd;
    353353  hdr.cmd_len = cmd_len;
     
    355355  hdr.mx_sb_len = SG_MAX_SENSE;
    356356  hdr.timeout = 50000;
    357357  hdr.interface_id = 'S';
    358   hdr.dxferp =  d->private->sg_buffer;
     358  hdr.dxferp =  d->private_data->sg_buffer;
    359359  hdr.flags = SG_FLAG_DIRECT_IO;  /* direct IO if we can get it */
    360360
    361361  /* scary buffer fill hack */
     
    400400  if(bytecheck && in_size<out_size){
    401401    long i,flag=0;
    402402    for(i=in_size;i<out_size;i++)
    403       if(d->private->sg_buffer[i]!=bytefill){
     403      if(d->private_data->sg_buffer[i]!=bytefill){
    404404        flag=1;
    405405        break;
    406406      }
     
    412412  }
    413413
    414414  /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
    415   /* d->private->last_milliseconds = hdr.duration; */
     415  /* d->private_data->last_milliseconds = hdr.duration; */
    416416
    417417  errno = 0;
    418418  return 0;
     
    445445
    446446  handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
    447447
    448   key = d->private->sg_buffer[2] & 0xf;
    449   ASC = d->private->sg_buffer[12];
    450   ASCQ = d->private->sg_buffer[13];
     448  key = d->private_data->sg_buffer[2] & 0xf;
     449  ASC = d->private_data->sg_buffer[12];
     450  ASCQ = d->private_data->sg_buffer[13];
    451451 
    452452  if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
    453453  return 1;
     
    492492  if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
    493493
    494494  {
    495     unsigned char *b=d->private->sg_buffer;
     495    unsigned char *b=d->private_data->sg_buffer;
    496496    if(b[0])return(1); /* Handles only up to 256 bytes */
    497497    if(b[6])return(1); /* Handles only up to 256 bytes */
    498498
     
    604604static unsigned int get_orig_sectorsize(cdrom_drive *d){
    605605  if(mode_sense(d,12,0x01))return(-1);
    606606
    607   d->orgdens = d->private->sg_buffer[4];
    608   return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
     607  d->orgdens = d->private_data->sg_buffer[4];
     608  return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
    609609}
    610610
    611611/* switch CDROM scsi drives to given sector size  */
     
    664664    return(-4);
    665665  }
    666666
    667   first=d->private->sg_buffer[2];
    668   last=d->private->sg_buffer[3];
     667  first=d->private_data->sg_buffer[2];
     668  last=d->private_data->sg_buffer[3];
    669669  tracks=last-first+1;
    670670
    671671  if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
     
    683683      return(-5);
    684684    }
    685685    {
    686       scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
     686      scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
    687687
    688688      d->disc_toc[i-first].bFlags=toc->bFlags;
    689689      d->disc_toc[i-first].bTrack=i;
     
    704704    return(-2);
    705705  }
    706706  {
    707     scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
     707    scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
    708708   
    709709    d->disc_toc[i-first].bFlags=toc->bFlags;
    710710    d->disc_toc[i-first].bTrack=0xAA;
     
    738738  }
    739739
    740740  /* copy to our structure and convert start sector */
    741   tracks = d->private->sg_buffer[1];
     741  tracks = d->private_data->sg_buffer[1];
    742742  if (tracks > MAXTRK) {
    743743    cderror(d,"003: CDROM reporting illegal number of tracks\n");
    744744    return(-3);
     
    754754      return(-5);
    755755    }
    756756   
    757     d->disc_toc[i].bFlags = d->private->sg_buffer[10];
     757    d->disc_toc[i].bFlags = d->private_data->sg_buffer[10];
    758758    d->disc_toc[i].bTrack = i + 1;
    759759
    760760    d->disc_toc[i].dwStartSector= d->adjust_ssize *
    761         (((signed char)(d->private->sg_buffer[2])<<24) |
    762          (d->private->sg_buffer[3]<<16)|
    763          (d->private->sg_buffer[4]<<8)|
    764          (d->private->sg_buffer[5]));
     761        (((signed char)(d->private_data->sg_buffer[2])<<24) |
     762         (d->private_data->sg_buffer[3]<<16)|
     763         (d->private_data->sg_buffer[4]<<8)|
     764         (d->private_data->sg_buffer[5]));
    765765  }
    766766
    767767  d->disc_toc[i].bFlags = 0;
    768768  d->disc_toc[i].bTrack = i + 1;
    769   memcpy (&foo, d->private->sg_buffer+2, 4);
    770   memcpy (&bar, d->private->sg_buffer+6, 4);
     769  memcpy (&foo, d->private_data->sg_buffer+2, 4);
     770  memcpy (&bar, d->private_data->sg_buffer+6, 4);
    771771  d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
    772772                                                    be32_to_cpu(bar));
    773773
    774774  d->disc_toc[i].dwStartSector= d->adjust_ssize *
    775     ((((signed char)(d->private->sg_buffer[2])<<24) |
    776       (d->private->sg_buffer[3]<<16)|
    777       (d->private->sg_buffer[4]<<8)|
    778       (d->private->sg_buffer[5]))+
     775    ((((signed char)(d->private_data->sg_buffer[2])<<24) |
     776      (d->private_data->sg_buffer[3]<<16)|
     777      (d->private_data->sg_buffer[4]<<8)|
     778      (d->private_data->sg_buffer[5]))+
    779779     
    780      ((((signed char)(d->private->sg_buffer[6])<<24) |
    781        (d->private->sg_buffer[7]<<16)|
    782        (d->private->sg_buffer[8]<<8)|
    783        (d->private->sg_buffer[9]))));
     780     ((((signed char)(d->private_data->sg_buffer[6])<<24) |
     781       (d->private_data->sg_buffer[7]<<16)|
     782       (d->private_data->sg_buffer[8]<<8)|
     783       (d->private_data->sg_buffer[9]))));
    784784
    785785
    786786  d->cd_extra = FixupTOC(d,tracks+1);
     
    817817  cmd[8] = sectors;
    818818  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    819819    return(ret);
    820   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     820  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    821821  return(0);
    822822}
    823823
     
    836836  cmd[9] = sectors;
    837837  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    838838    return(ret);
    839   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     839  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    840840  return(0);
    841841}
    842842
     
    854854  cmd[8] = sectors;
    855855  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    856856    return(ret);
    857   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     857  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    858858  return(0);
    859859}
    860860
     
    872872  cmd[9] = sectors;
    873873  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    874874    return(ret);
    875   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     875  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    876876  return(0);
    877877}
    878878
     
    890890  cmd[8] = sectors;
    891891  if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    892892    return(ret);
    893   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     893  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    894894  return(0);
    895895}
    896896
     
    908908  cmd[9] = sectors;
    909909  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    910910    return(ret);
    911   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     911  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    912912  return(0);
    913913}
    914914
     
    922922  cmd[8] = sectors;
    923923  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    924924    return(ret);
    925   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     925  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    926926  return(0);
    927927}
    928928
     
    936936  cmd[8] = sectors;
    937937  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    938938    return(ret);
    939   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     939  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    940940  return(0);
    941941}
    942942
     
    950950  cmd[8] = sectors;
    951951  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    952952    return(ret);
    953   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     953  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    954954  return(0);
    955955}
    956956
     
    964964  cmd[8] = sectors;
    965965  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    966966    return(ret);
    967   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     967  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    968968  return(0);
    969969}
    970970
     
    978978  cmd[8] = sectors;
    979979  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    980980    return(ret);
    981   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     981  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    982982  return(0);
    983983}
    984984
     
    992992  cmd[8] = sectors;
    993993  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    994994    return(ret);
    995   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     995  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    996996  return(0);
    997997}
    998998
     
    10261026
    10271027  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10281028    return(ret);
    1029   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1029  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10301030  return(0);
    10311031}
    10321032
     
    10391039
    10401040  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10411041    return(ret);
    1042   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1042  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10431043  return(0);
    10441044}
    10451045
     
    10521052 
    10531053  if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
    10541054    return(ret);
    1055   if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
     1055  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
    10561056  return(0);
    10571057}
    10581058
     
    12751275static int count_2352_bytes(cdrom_drive *d){
    12761276  long i;
    12771277  for(i=2351;i>=0;i--)
    1278     if(d->private->sg_buffer[i]!=(unsigned char)'\177')
     1278    if(d->private_data->sg_buffer[i]!=(unsigned char)'\177')
    12791279      return(((i+3)>>2)<<2);
    12801280
    12811281  return(0);
     
    12841284static int verify_nonzero(cdrom_drive *d){
    12851285  long i,flag=0;
    12861286  for(i=0;i<2352;i++)
    1287     if(d->private->sg_buffer[i]!=0){
     1287    if(d->private_data->sg_buffer[i]!=0){
    12881288      flag=1;
    12891289      break;
    12901290    }
     
    16251625  d->is_mmc=0;
    16261626  if(mode_sense(d,22,0x2A)==0){
    16271627 
    1628     b=d->private->sg_buffer;
     1628    b=d->private_data->sg_buffer;
    16291629    b+=b[3]+4;
    16301630   
    16311631    if((b[0]&0x3F)==0x2A){
     
    16731673    cderror(d,"008: Unable to identify CDROM model\n");
    16741674    return(NULL);
    16751675  }
    1676   return (d->private->sg_buffer);
     1676  return (d->private_data->sg_buffer);
    16771677}
    16781678
    16791679int scsi_init_drive(cdrom_drive *d){
     
    17421742  check_cache(d);
    17431743
    17441744  d->error_retry=1;
    1745   d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
    1746   d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
     1745  d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
     1746  d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
    17471747  d->report_all=1;
    17481748  return(0);
    17491749}
  • interface/test_interface.c

    a b  
    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;