Message-Id: <200007210759.KAA15139@mailgw1.netvision.net.il> Date: Fri, 21 Jul 2000 10:59:44 +0200 To: "Thorsten Erdmann" X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b From: "Eli Zaretskii" CC: djgpp AT delorie DOT com In-reply-to: <8l7gic$2ku$1@riker.addcom.de> (thorsten.erdmann@gmx.de) Subject: Re: How to flush CDROMs and MSCDEX buffers References: <8l7gic$2ku$1 AT riker DOT addcom DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Thorsten Erdmann" > Newsgroups: comp.os.msdos.djgpp > Date: Thu, 20 Jul 2000 20:28:47 +0200 > > I have some problems with my Joliet driver. For reading from CD I use > MSCDEX. It's Readblock and DiskInfo functions return the same sectors even > if I change the CD. So I read the directory of the first CD, all works fine. > When I insert another CD and read the directory again I get that one from > the old CD. So someone seems to buffer some CD sectors, maybe the CD drive > itself or MSCDEX. It's MSCDEX and/or the disk cache (if you have one installed). > How can I flush that buffer to read the actual info? Try looking at files statfs.c and mntent.c in the DJGPP library sources (v2/djlsr203.zip from the usual DJGPP sites). They use a few subfunctions of function 15h of interrupt 2Fh to read information from the CD drive, and they do it in a manner that avoids getting stale info when the disk changes. They might give you a few ideas.