src/cdrom/qnx/SDL_syscdrom.c
branchgsoc2008_nds
changeset 2669 e27bdcc80744
parent 1895 c121d94672cb
child 2859 99210400e8b9
equal deleted inserted replaced
2668:bb3241de289e 2669:e27bdcc80744
   182                 if (delim) {
   182                 if (delim) {
   183                     SDLcdrom = delim;
   183                     SDLcdrom = delim;
   184                 } else {
   184                 } else {
   185                     SDLcdrom = NULL;
   185                     SDLcdrom = NULL;
   186                 }
   186                 }
   187             }
   187             } while (SDLcdrom);
   188             while (SDLcdrom);
       
   189             SDL_stack_free(cdpath);
   188             SDL_stack_free(cdpath);
   190         }
   189         }
   191 
   190 
   192         /* If we found our drives, there's nothing left to do */
   191         /* If we found our drives, there's nothing left to do */
   193         if (SDL_numcds > 0) {
   192         if (SDL_numcds > 0) {
   355             /* workaround for broken cdroms, which can return always EAGAIN when its not ready, */
   354             /* workaround for broken cdroms, which can return always EAGAIN when its not ready, */
   356             /* that mean errornous media or just no media avail                                 */
   355             /* that mean errornous media or just no media avail                                 */
   357             devctlret = ENXIO;
   356             devctlret = ENXIO;
   358             break;
   357             break;
   359         }
   358         }
   360     }
   359     } while ((devctlret == EAGAIN) || (devctlret == ESTALE));
   361     while ((devctlret == EAGAIN) || (devctlret == ESTALE));
       
   362 
   360 
   363     if (devctlret != 0) {
   361     if (devctlret != 0) {
   364         if (devctlret == ENXIO) {
   362         if (devctlret == ENXIO) {
   365             status = CD_TRAYEMPTY;
   363             status = CD_TRAYEMPTY;
   366         } else {
   364         } else {