cdrom: add debug print if no sg devices were found\n

This commit is contained in:
Brad Parker 2019-07-25 09:53:47 -04:00
parent d48ad5261e
commit d8b99470b3

View File

@ -1329,6 +1329,7 @@ struct string_list* cdrom_get_available_drives(void)
#if defined(__linux__) && !defined(ANDROID)
struct string_list *dir_list = dir_list_new("/dev", NULL, false, false, false, false);
int i;
bool found = false;
if (!dir_list)
return list;
@ -1345,6 +1346,8 @@ struct string_list* cdrom_get_available_drives(void)
libretro_vfs_implementation_file *stream;
bool is_cdrom = false;
found = true;
if (!file)
continue;
@ -1369,6 +1372,14 @@ struct string_list* cdrom_get_available_drives(void)
}
}
if (!found)
{
#ifdef CDROM_DEBUG
printf("[CDROM] No sg devices found. Is the sg kernel module loaded?\n");
fflush(stdout);
#endif
}
string_list_free(dir_list);
#endif
#if defined(_WIN32) && !defined(_XBOX)