delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/26/18:50:25

Message-Id: <5.0.0.25.0.20001026154432.035801c0@mail.subdimension.com>
X-Sender: matt DOT l AT mail DOT subdimension DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.0
Date: Thu, 26 Oct 2000 15:48:33 -0700
To: djgpp AT delorie DOT com, "Salvador I. Ducros" <sducros AT home DOT com>
From: Matt Lewandowsky <matt DOT l AT techie DOT com>
Subject: Re: Loading ramdrive.sys
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.1001025095558.7418G-100000@is>
References: <39F60D12 DOT 50E1 AT cdn-net DOT com>
Mime-Version: 1.0
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 00.56 10/25/2000, Eli Zaretskii wrote:

>On Tue, 24 Oct 2000, Salvador I. Ducros wrote:
><SNIPPED>
> > If not, anybody out there have any ideas of how to detect if
> > the ramdrive.sys driver has been previously loaded and if so, what
> > drive letter it is using?
>
>It is not clear whether you want to detect any RAM disk, or
>ramdrive.sys specifically.
>
>If the former, you can use library function `getmntent': it returns,
>for each drive, a structure where one member gives the type of the
>filesystem mounted on that drive.  That function is quite slow, but if
>you need only to call it once, you might not bother.

In the latter, you can check the volume label of the drive. If it's 
MS_RAMDRIVE, then it's MS-DOS's RAM DISK or equivelent. However, if the RAM 
DISK has been relabeled with the 'label' command, there may be no way...

>(Btw, I'd suggest to describe the reasons why you need to know this;
>perhaps there's a different solution to your original problem, which
>doesn't involve probing drives for being RAM disks.)

Yes, it sounds like there must be a much more elegant solution, but it is 
impossible to find without acutally knowing all the circumstances.

Just my $0.02,

- --Matt

- --
     Matt Lewandowsky        matt DOT l AT techie DOT com         877-225-7490
       PGP Key ID: 0x1D3A6BA7    URL: http://www.greenviolet.net
                               (Web page only up when I'm online)
"... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."
                 -- Robert Firth

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOfi0wOoMko8dOmunEQK+uwCgze5Pgude3iefyj8o+XpENT6AjWYAoJEk
mM3PNTjcynvSE3IPYbe3fN76
=0XEQ
-----END PGP SIGNATURE-----

- Raw text -


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