changeset 396:11d6eed68dba

Added check for ENOMEDIUM to the Linux CDROM code
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jun 2002 20:37:39 +0000
parents 276d0d7ba96c
children 283d348cb624
files src/cdrom/linux/SDL_syscdrom.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cdrom/linux/SDL_syscdrom.c	Mon Jun 10 20:23:26 2002 +0000
+++ b/src/cdrom/linux/SDL_syscdrom.c	Mon Jun 10 20:37:39 2002 +0000
@@ -100,8 +100,12 @@
 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)