Better error message when CD audio scanning failed.

This commit is contained in:
rocky
2005-01-09 13:19:17 +00:00
parent ba7d7c0684
commit db486c617d

View File

@@ -888,15 +888,20 @@ main(int argc,char *argv[])
CDIO_FS_AUDIO, CDIO_FS_AUDIO,
false, false,
&driver_id); &driver_id);
if (NULL != ppsz_cd_drives) if (ppsz_cd_drives) {
d=cdda_identify(*ppsz_cd_drives,verbose, NULL); d=cdda_identify(*ppsz_cd_drives,verbose, NULL);
} else {
report("\nUnable find a CD-ROM drive with an audio CD in it.");
exit(1);
}
cdio_free_device_list(ppsz_cd_drives); cdio_free_device_list(ppsz_cd_drives);
free(ppsz_cd_drives); free(ppsz_cd_drives);
} }
if(!d){ if(!d){
if(!verbose) if(!verbose)
report("\nUnable to open cdrom drive; -v will give more information."); report("\nUnable to open cdrom drive; -v might give more information.");
exit(1); exit(1);
} }