www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/29/15:58:22

Date: Sun, 29 Aug 1999 14:37:17 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tom <thomasbd AT erols DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Detecting Audio CD...
In-Reply-To: <7q4bu6$r45$1@autumn.news.rcn.net>
Message-ID: <Pine.SUN.3.91.990829143639.9438j-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019