@@ -99,7 +99,7 @@ void increment_msf(unsigned char *min, unsigned char *sec, unsigned char *frame)
99
99
}
100
100
101
101
#ifdef CDROM_DEBUG
102
- static void cdrom_print_sense_data (const unsigned char * sense , size_t len )
102
+ static void cdrom_print_sense_data (const unsigned char * s , size_t len )
103
103
{
104
104
unsigned i ;
105
105
const char * sense_key_text = NULL ;
@@ -114,20 +114,20 @@ static void cdrom_print_sense_data(const unsigned char *sense, size_t len)
114
114
return ;
115
115
}
116
116
117
- key = sense [2 ] & 0xF ;
118
- asc = sense [12 ];
119
- ascq = sense [13 ];
117
+ key = s [2 ] & 0xF ;
118
+ asc = s [12 ];
119
+ ascq = s [13 ];
120
120
121
121
printf ("[CDROM] Sense Data: " );
122
122
123
123
for (i = 0 ; i < MIN (len , 16 ); i ++ )
124
- printf ("%02X " , sense [i ]);
124
+ printf ("%02X " , s [i ]);
125
125
126
126
printf ("\n" );
127
127
128
- if (sense [0 ] == 0x70 )
128
+ if (s [0 ] == 0x70 )
129
129
printf ("[CDROM] CURRENT ERROR:\n" );
130
- if (sense [0 ] == 0x71 )
130
+ if (s [0 ] == 0x71 )
131
131
printf ("[CDROM] DEFERRED ERROR:\n" );
132
132
133
133
switch (key )
@@ -371,17 +371,17 @@ static int cdrom_send_command_linux(const libretro_vfs_implementation_file *stre
371
371
#endif
372
372
373
373
static int cdrom_send_command (libretro_vfs_implementation_file * stream , CDROM_CMD_Direction dir ,
374
- void * buf , size_t len , unsigned char * cmd , size_t cmd_len , size_t skip )
374
+ void * s , size_t len , unsigned char * cmd , size_t cmd_len , size_t skip )
375
375
{
376
- unsigned char * xfer_buf = NULL ;
377
- unsigned char * xfer_buf_pos = xfer_buf ;
378
- unsigned char sense [CDROM_MAX_SENSE_BYTES ] = {0 };
379
- unsigned char retries_left = CDROM_MAX_RETRIES ;
380
376
int i , rv = 0 ;
381
377
int frames = 1 ;
378
+ unsigned char * xfer_buf = NULL ;
379
+ unsigned char * xfer_buf_pos = xfer_buf ;
380
+ unsigned char sense [CDROM_MAX_SENSE_BYTES ] = {0 };
381
+ unsigned char retries_left = CDROM_MAX_RETRIES ;
382
382
size_t padded_req_bytes ;
383
- size_t copied_bytes = 0 ;
384
- bool read_cd = false;
383
+ size_t copied_bytes = 0 ;
384
+ bool read_cd = false;
385
385
386
386
if (!cmd || cmd_len == 0 || cmd_len < CDROM_MIN_BUFSIZE )
387
387
return 1 ;
@@ -491,13 +491,13 @@ static int cdrom_send_command(libretro_vfs_implementation_file *stream, CDROM_CM
491
491
{
492
492
rv = 0 ;
493
493
494
- if (buf )
494
+ if (s )
495
495
{
496
496
#if 0
497
497
printf ("offsetting %" PRId64 " from buf, copying at xfer_buf offset %" PRId64 ", copying %" PRId64 " bytes\n" , copied_bytes , (xfer_buf_pos + skip ) - xfer_buf , copy_len );
498
498
fflush (stdout );
499
499
#endif
500
- memcpy ((char * )buf + copied_bytes , xfer_buf_pos + skip , copy_len );
500
+ memcpy ((char * )s + copied_bytes , xfer_buf_pos + skip , copy_len );
501
501
copied_bytes += copy_len ;
502
502
503
503
if (read_cd && !cached_read && request_len >= 2352 )
@@ -570,7 +570,6 @@ static int cdrom_send_command(libretro_vfs_implementation_file *stream, CDROM_CM
570
570
571
571
if (xfer_buf )
572
572
memalign_free (xfer_buf );
573
-
574
573
return rv ;
575
574
}
576
575
@@ -1168,7 +1167,10 @@ int cdrom_get_inquiry(libretro_vfs_implementation_file *stream, char *s, size_t
1168
1167
return 0 ;
1169
1168
}
1170
1169
1171
- int cdrom_read (libretro_vfs_implementation_file * stream , cdrom_group_timeouts_t * timeouts , unsigned char min , unsigned char sec , unsigned char frame , void * s , size_t len , size_t skip )
1170
+ int cdrom_read (libretro_vfs_implementation_file * stream ,
1171
+ cdrom_group_timeouts_t * timeouts , unsigned char min ,
1172
+ unsigned char sec , unsigned char frame , void * s ,
1173
+ size_t len , size_t skip )
1172
1174
{
1173
1175
/* MMC Command: READ CD MSF */
1174
1176
unsigned char cdb [] = {0xB9 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0xF8 , 0 , 0 };
0 commit comments