Search
lxdream.org :: lxdream/src/drivers/cd_linux.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/cd_linux.c
changeset 788:eb238a77f3c0
prev777:60431d09605c
next806:6ef1ce4a9dbc
author nkeynes
date Tue Jul 29 23:25:03 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Fix minor warnings
file annotate diff log raw
1.1 --- a/src/drivers/cd_linux.c Mon Jul 28 06:29:46 2008 +0000
1.2 +++ b/src/drivers/cd_linux.c Tue Jul 29 23:25:03 2008 +0000
1.3 @@ -53,7 +53,7 @@
1.4 static gdrom_error_t linux_identify_drive( int fd, unsigned char *buf, int buflen );
1.5 static gdrom_error_t linux_read_sector( gdrom_disc_t disc, uint32_t sector,
1.6 int mode, unsigned char *buf, uint32_t *length );
1.7 -static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, size_t *buflen,
1.8 +static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, uint32_t *buflen,
1.9 int direction );
1.10 static int linux_drive_status( gdrom_disc_t disc );
1.11
1.12 @@ -163,7 +163,7 @@
1.13 {
1.14 int fd = fileno(disc->file);
1.15 unsigned char buf[MAXTOCSIZE];
1.16 - size_t buflen = sizeof(buf);
1.17 + uint32_t buflen = sizeof(buf);
1.18 char cmd[12] = { 0x43, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
1.19
1.20 cmd[7] = (sizeof(buf))>>8;
1.21 @@ -206,7 +206,7 @@
1.22
1.23 static unsigned char *trim( unsigned char *src )
1.24 {
1.25 - char *p = src + strlen(src)-1;
1.26 + unsigned char *p = src + strlen(src)-1;
1.27 while( isspace(*src) )
1.28 src++;
1.29 while( p >= src && isspace(*p) )
1.30 @@ -258,7 +258,7 @@
1.31 * @return 0 on success, -1 on an operating system error, or a sense error
1.32 * code on a device error.
1.33 */
1.34 -static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, size_t *buflen,
1.35 +static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, uint32_t *buflen,
1.36 int direction )
1.37 {
1.38 struct request_sense sense;
.