delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/26/16:11:32

Date: Thu, 26 Oct 2000 22:12:25 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Message-Id: <7704-Thu26Oct2000221225+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h
CC: djgpp AT delorie DOT com
In-reply-to: <8t9kq9$8d$1@nets3.rz.RWTH-Aachen.DE> (message from Hans-Bernhard
Broeker on 26 Oct 2000 16:06:33 GMT)
Subject: Re: Loading ramdrive.sys
References: <39F7DEBC DOT 7938A452 AT ma DOT tum DOT de> <39f84c2f$1 AT news DOT gemsoft DOT net> <8t9kq9$8d$1 AT nets3 DOT rz DOT RWTH-Aachen 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

> From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
> Newsgroups: comp.os.msdos.djgpp
> Date: 26 Oct 2000 16:06:33 GMT
> 
> A single interrrupt call most likely won't give you that information,
> but a little program along the lines of what Eli already hinted at, in
> this thread, should help: loop over all drives with getmntent() and
> check each of them if it's the ramdrive. The check itself can be done
> in various ways. You can check the volume label, e.g.. IIRC, it's
> always something like "RAMDRIVE" or so for ramdrives.

Actually, `getmntent' already does the footwork for you: it returns
the string "ram" in the mnt_type member of the struct it returns, for
RAM disks.

Checking for the magic volume label is not a good idea, in my
experience: many RAM disks have all kinds of arbitrary strings there.
`getmntent' pulls out some trickery to find out whether a given drive
is a RAM disk.

- Raw text -


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