Added check for ENOMEDIUM to the Linux CDROM code
authorSam Lantinga <slouken@libsdl.org>
Mon, 10 Jun 2002 20:37:39 +0000
changeset 39611d6eed68dba
parent 395 276d0d7ba96c
child 397 283d348cb624
Added check for ENOMEDIUM to the Linux CDROM code
src/cdrom/linux/SDL_syscdrom.c
     1.1 --- a/src/cdrom/linux/SDL_syscdrom.c	Mon Jun 10 20:23:26 2002 +0000
     1.2 +++ b/src/cdrom/linux/SDL_syscdrom.c	Mon Jun 10 20:37:39 2002 +0000
     1.3 @@ -100,8 +100,12 @@
     1.4  static void SDL_SYS_CDClose(SDL_CD *cdrom);
     1.5  
     1.6  /* Some ioctl() errno values which occur when the tray is empty */
     1.7 +#ifndef ENOMEDIUM
     1.8 +#define ENOMEDIUM ENOENT
     1.9 +#endif
    1.10  #define ERRNO_TRAYEMPTY(errno)	\
    1.11 -	((errno == EIO) || (errno == ENOENT) || (errno == EINVAL))
    1.12 +	((errno == EIO)    || (errno == ENOENT) || \
    1.13 +	 (errno == EINVAL) || (errno == ENOMEDIUM))
    1.14  
    1.15  /* Check a drive to see if it is a CD-ROM */
    1.16  static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf)