Mercurial > sdl-ios-xcode
comparison src/cdrom/linux/SDL_syscdrom.c @ 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 | f6ffac90895c |
children | b8d311d90021 |
comparison
equal
deleted
inserted
replaced
395:276d0d7ba96c | 396:11d6eed68dba |
---|---|
98 static int SDL_SYS_CDStop(SDL_CD *cdrom); | 98 static int SDL_SYS_CDStop(SDL_CD *cdrom); |
99 static int SDL_SYS_CDEject(SDL_CD *cdrom); | 99 static int SDL_SYS_CDEject(SDL_CD *cdrom); |
100 static void SDL_SYS_CDClose(SDL_CD *cdrom); | 100 static void SDL_SYS_CDClose(SDL_CD *cdrom); |
101 | 101 |
102 /* Some ioctl() errno values which occur when the tray is empty */ | 102 /* Some ioctl() errno values which occur when the tray is empty */ |
103 #ifndef ENOMEDIUM | |
104 #define ENOMEDIUM ENOENT | |
105 #endif | |
103 #define ERRNO_TRAYEMPTY(errno) \ | 106 #define ERRNO_TRAYEMPTY(errno) \ |
104 ((errno == EIO) || (errno == ENOENT) || (errno == EINVAL)) | 107 ((errno == EIO) || (errno == ENOENT) || \ |
108 (errno == EINVAL) || (errno == ENOMEDIUM)) | |
105 | 109 |
106 /* Check a drive to see if it is a CD-ROM */ | 110 /* Check a drive to see if it is a CD-ROM */ |
107 static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf) | 111 static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf) |
108 { | 112 { |
109 int is_cd, cdfd; | 113 int is_cd, cdfd; |