Mercurial > sdl-ios-xcode
diff src/cdrom/linux/SDL_syscdrom.c @ 1051:091350827e08
SDL_CDOpen() fails on Linux if data track on disc is mounted in the
filesystem. Removing O_EXCL from open() call fixes this.
Problem and solution noted by "Fosters":
http://www.libsdl.org/pipermail/sdl/2005-March/068028.html
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 17 Apr 2005 10:36:03 +0000 |
parents | 0e6627072f7a |
children | 3e637850c02b |
line wrap: on
line diff
--- a/src/cdrom/linux/SDL_syscdrom.c Sun Apr 17 10:32:41 2005 +0000 +++ b/src/cdrom/linux/SDL_syscdrom.c Sun Apr 17 10:36:03 2005 +0000 @@ -132,7 +132,7 @@ /* If it does exist, verify that it's an available CD-ROM */ is_cd = 0; if ( S_ISCHR(stbuf->st_mode) || S_ISBLK(stbuf->st_mode) ) { - cdfd = open(drive, (O_RDONLY|O_EXCL|O_NONBLOCK), 0); + cdfd = open(drive, (O_RDONLY|O_NONBLOCK), 0); if ( cdfd >= 0 ) { info.cdsc_format = CDROM_MSF; /* Under Linux, EIO occurs when a disk is not present. @@ -393,7 +393,7 @@ static int SDL_SYS_CDOpen(int drive) { - return(open(SDL_cdlist[drive], (O_RDONLY|O_EXCL|O_NONBLOCK), 0)); + return(open(SDL_cdlist[drive], (O_RDONLY|O_NONBLOCK), 0)); } static int SDL_SYS_CDGetTOC(SDL_CD *cdrom)