filename | src/drivers/cd_linux.c |
changeset | 806:6ef1ce4a9dbc |
prev | 788:eb238a77f3c0 |
next | 1023:264e2fd90be8 |
author | nkeynes |
date | Wed Mar 25 11:57:05 2009 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Change glXMakeContextCurrent call to glXMakeCurrent - works around crash bug in mesa: http://www.mail-archive.com/mesa-commit@lists.freedesktop.org/msg04338.html |
file | annotate | diff | log | raw |
1.1 --- a/src/drivers/cd_linux.c Tue Jul 29 23:25:03 2008 +00001.2 +++ b/src/drivers/cd_linux.c Wed Mar 25 11:57:05 2009 +00001.3 @@ -20,6 +20,7 @@1.4 #include <stdio.h>1.5 #include <string.h>1.6 #include <errno.h>1.7 +#include <ctype.h>1.8 #include <linux/cdrom.h>1.9 #include <sys/stat.h>1.10 #include <sys/ioctl.h>1.11 @@ -50,7 +51,7 @@1.12 static gboolean linux_image_is_valid( FILE *f );1.13 static gdrom_disc_t linux_open_device( const gchar *filename, FILE *f );1.14 static gdrom_error_t linux_read_disc_toc( gdrom_image_t disc );1.15 -static gdrom_error_t linux_identify_drive( int fd, unsigned char *buf, int buflen );1.16 +static gdrom_error_t linux_identify_drive( int fd, char *buf, int buflen );1.17 static gdrom_error_t linux_read_sector( gdrom_disc_t disc, uint32_t sector,1.18 int mode, unsigned char *buf, uint32_t *length );1.19 static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, uint32_t *buflen,1.20 @@ -204,16 +205,16 @@1.21 return linux_send_command( fd, cmd, NULL, &buflen, CGC_DATA_NONE );1.22 }1.24 -static unsigned char *trim( unsigned char *src )1.25 +static char *trim( char *src )1.26 {1.27 - unsigned char *p = src + strlen(src)-1;1.28 + char *p = src + strlen(src)-1;1.29 while( isspace(*src) )1.30 src++;1.31 while( p >= src && isspace(*p) )1.32 *p-- = '\0';1.33 return src;1.34 }1.35 -static gdrom_error_t linux_identify_drive( int fd, unsigned char *buf, int buflen )1.36 +static gdrom_error_t linux_identify_drive( int fd, char *buf, int buflen )1.37 {1.38 unsigned char ident[256];1.39 uint32_t identlen = 256;
.