Mail Archives: djgpp/1999/08/29/15:58:22
On Thu, 26 Aug 1999, Tom wrote:
> How do I detect if the CD inserted into my cd-rom drive is an audio or data
> cd? Any info or code on the subject is greatly appreciated.
You can find some code in the DJGPP library sources (v2/djlsr202.zip),
in the files src/libc/compat/mntent/mntent.c and
src/libc/compat/sys/vfs/statfs.c.
I don't remember whether the library functions that these source files
define, `getmntent' and `statfs', succeed or fail in case of an audio
disk (I thing `statfs' fails), but trying these two functions would be
a beginning; if one of them fails for an audio disk, you are home
free. If not, you can use the sources as the starting point.
Good luck (you will need it, as the MS CD interface is a mess)!
- Raw text -