delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/06/06:44:34

X-Originating-IP: [200.42.4.138]
From: "Norberto Alfredo Bensa" <ceo AT nbensacomputers DOT com>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp-workers AT delorie DOT com>, <ams AT ludd DOT luth DOT se>
References: <200101051844 DOT TAA15180 AT father DOT ludd DOT luth DOT se> <OE57H69IsfV89a3KHtF00003709 AT hotmail DOT com> <1438-Sat06Jan2001124155+0200-eliz AT is DOT elta DOT co DOT il>
Subject: Re: Fw: Patch for statfs.c
Date: Sat, 6 Jan 2001 08:39:05 -0000
Organization: nBens@ Computers
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <OE9WXeVGTmboQWp6ozp00004212@hotmail.com>
X-OriginalArrivalTime: 06 Jan 2001 11:44:27.0665 (UTC) FILETIME=[062C5810:01C077D6]
Reply-To: djgpp-workers AT delorie DOT com

From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
> > From: "Norberto Alfredo Bensa" <ceo AT nbensacomputers DOT com>
> > Date: Fri, 5 Jan 2001 21:48:08 -0300
> >
> > I've moved the CD-ROM calls down to the "one_more_try" part of the code,
> > just before 213600.
> [snip]
> >   if (0x07 <= dos_version /* Is FAT32 supported? */
> >   && 0x0a != dos_version)  /* OS/2 doesn't support FAT32 */
> >   {
> >     /* 217303 - Win9x - Get Extended Free Drive Space:
>
> Are we sure that CD-ROMs and DVDs support FAT32 calls?  If not, I
> think we should not issue FAT32 calls for CDs and DVDs.  At least for
> a CD, you can know that it's a CD with this snippet:
>
> >     regs.x.ax = 0x150b;   /* is this drive supported by CD-ROM driver?
*/
> >     regs.x.cx = drive_number;
> >     __dpmi_int(0x2f, &regs);
> >     if ((regs.x.flags & 1) == 0 && regs.x.bx == 0xadad && regs.x.ax !=
0)
> >     {

What about DVDs? Is a DVD-ROM recognized as a CD-ROM, i.e. will the above
code be true if it is a DVD-ROM or it will be false?

Martin, can you please test the following?

#include <stdio.h>
#include <dos.h>

int main (void)
{
    if (_is_cdrom_drive ( 'R' - 'A' +1 ))
    {
        printf ("is a CDROM\n");
    }
    else
    {
        printf ("not a CD-ROM\n");
    }
}

What does print if you test with a DVD-ROM in your R: drive?

Regards,
Norberto




- Raw text -


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