delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/04/30/11:45:04

Date: Wed, 30 Apr 2003 17:24:32 +0200
From: Vincenzo Morello <morellov AT tin DOT it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en,it
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Drive type under DOS djgpp
References: <3ead4f4b AT shknews01> <7458-Mon28Apr2003205653+0300-eliz AT elta DOT co DOT il>
In-Reply-To: <7458-Mon28Apr2003205653+0300-eliz@elta.co.il>
NNTP-Posting-Host: 81.72.138.137
Message-ID: <3eafeabc@shknews01>
X-Trace: shknews01 1051716284 81.72.138.137 (30 Apr 2003 23:24:44 +0800)
Lines: 20
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> Call the library function `getmntent' and look at the `mnt_type'
> member of the struct it returns.

I tested it and it works fine, but unfortunately it looks like I have to apply 
getmntent() to all possible mounted file systems. This has the side effect of 
performing a seek to all floppy drives.
I need the drive type information when opening the file browser of my GUI library, 
and having to wait for the empty floppy drives to complete the seek is a little 
annoying.
As a temporary fix I'm currently using function _is_remote_drive() which allows me 
to distinguish the CDROM unit from the HD unit (even in djgpp 2.0.3).
Hopefully the function suggested by Gisle (_is_cdrom_drive()) coming in 2.0.4 
would help me distinguishing a CDROM unit from a network drive.

I'll release soon the GUI demo for my cross-platform GUI library´using djgpp+GRX.

Thanks to both Eli and Gisle,
/Vincenzo

- Raw text -


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