Mail Archives: djgpp/2000/10/26/16:11:32
> 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 -