diff --git a/include/cdio/device.h b/include/cdio/device.h index e3a705e2..5499995d 100644 --- a/include/cdio/device.h +++ b/include/cdio/device.h @@ -171,6 +171,15 @@ extern "C" { DRIVER_DEVICE /**< Is really a set of the above; should come last */ } driver_id_t; + /** A null-terminated (that is DRIVER_UNKNOWN-terminated) ordered (in + order of preference) array of drivers. + */ + extern const driver_id_t cdio_drivers[]; + /** A null-terminated (that is DRIVER_UNKNOWN-terminated) ordered (in + order of preference) array of device drivers. + */ + extern const driver_id_t cdio_device_drivers[]; + /** There will generally be only one hardware for a given build/platform from the list above. You can use the variable below to determine which you've got. If the build doesn't make an diff --git a/lib/driver/device.c b/lib/driver/device.c index 6e108f26..cac19438 100644 --- a/lib/driver/device.c +++ b/lib/driver/device.c @@ -270,6 +270,35 @@ CdIo_driver_t CdIo_all_drivers[CDIO_MAX_DRIVER+1] = { }; +const driver_id_t cdio_drivers[] = { + DRIVER_AIX, + DRIVER_BSDI, + DRIVER_FREEBSD, + DRIVER_NETBSD, + DRIVER_LINUX, + DRIVER_SOLARIS, + DRIVER_OS2, + DRIVER_OSX, + DRIVER_WIN32, + DRIVER_CDRDAO, + DRIVER_BINCUE, + DRIVER_NRG, + DRIVER_UNKNOWN +}; + +const driver_id_t cdio_device_drivers[] = { + DRIVER_AIX, + DRIVER_BSDI, + DRIVER_FREEBSD, + DRIVER_NETBSD, + DRIVER_LINUX, + DRIVER_SOLARIS, + DRIVER_OS2, + DRIVER_OSX, + DRIVER_WIN32, + DRIVER_UNKNOWN +}; + const char * cdio_driver_errmsg(driver_return_code_t drc) {