I'm looking to create a function in C++ running on Linux that returns true if the CDRom media is a DVD and false if its anything else (e.g. Audio CD).
I have been using ioctl
with linux/cdrom.h
.
I tried using the DVD_READ_STRUCT
but it always returns true. Maybe I'm using it incorrectly.
dvd_struct s
if (ioctl(hDEV, DVD_READ_STRUCT, &s)) {
return true;
}