Skip to content

Commit

Permalink
Added check for ENOMEDIUM to the Linux CDROM code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 10, 2002
1 parent dd18dd4 commit 62c2a08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cdrom/linux/SDL_syscdrom.c
Expand Up @@ -100,8 +100,12 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom);
static void SDL_SYS_CDClose(SDL_CD *cdrom);

/* Some ioctl() errno values which occur when the tray is empty */
#ifndef ENOMEDIUM
#define ENOMEDIUM ENOENT
#endif
#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 */
static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf)
Expand Down

0 comments on commit 62c2a08

Please sign in to comment.