Change mmc_have_interface() to mmc_get_interface() as only one interface can ever be returned.
Change example to the correct behaviour, that the application should do the checking not the library. Added new interfaces defined from MMC >=3 (IEEE1394B, SATA, USB) and the Vendor Unique one (can be important) that was missing.
This commit is contained in:
@@ -833,11 +833,14 @@ cdio_get_media_changed(CdIo_t *p_cdio)
|
||||
bool_3way_t
|
||||
cdio_have_atapi(CdIo_t *p_cdio)
|
||||
{
|
||||
bool_3way_t i_status;
|
||||
cdio_mmc_feature_interface_t i_interface;
|
||||
|
||||
if (!p_cdio) return nope;
|
||||
i_status = mmc_have_interface(p_cdio, CDIO_MMC_FEATURE_INTERFACE_ATAPI);
|
||||
if (dunno != i_status) return i_status;
|
||||
i_interface = mmc_get_interface(p_cdio);
|
||||
if (i_interface == CDIO_MMC_FEATURE_INTERFACE_ATAPI)
|
||||
return yep;
|
||||
if (i_interface != CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED)
|
||||
return nope;
|
||||
|
||||
{
|
||||
/* cdparanoia seems to think that if we have a mode sense command
|
||||
|
||||
Reference in New Issue
Block a user