Commit 60236871 authored by Sam Lantinga's avatar Sam Lantinga

Added check for ENOMEDIUM to the Linux CDROM code

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40397
parent d0fda064
...@@ -100,8 +100,12 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom); ...@@ -100,8 +100,12 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom);
static void SDL_SYS_CDClose(SDL_CD *cdrom); static void SDL_SYS_CDClose(SDL_CD *cdrom);
/* Some ioctl() errno values which occur when the tray is empty */ /* Some ioctl() errno values which occur when the tray is empty */
#ifndef ENOMEDIUM
#define ENOMEDIUM ENOENT
#endif
#define ERRNO_TRAYEMPTY(errno) \ #define ERRNO_TRAYEMPTY(errno) \
((errno == EIO) || (errno == ENOENT) || (errno == EINVAL)) ((errno == EIO) || (errno == ENOENT) || \
(errno == EINVAL) || (errno == ENOMEDIUM))
/* Check a drive to see if it is a CD-ROM */ /* Check a drive to see if it is a CD-ROM */
static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf) static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment