[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] removable medias



Hi,

I´ve got three types of removable medias: floppies (A:), EZ-cartridges
(F:) and CD´s (R:). Now I need to write a function that would list all
available logical drives in system - i.e. it should exclude removable
drives without a media (i.e. something like getmntent() in DJGPP).

For testing if there´s a media inserted in a drive I simply opendir()
that drive letter. Interesting is the different reaction of operating
system for the three types of removable medias:

empty CD-ROM  --> opendir() is OK

empty EZ-drive -> opendir() fails

empty floppy ---> system Alert asking me for inserting a floppy disk.

So the function can detect empty EZ-drive easily. It can´t see a
difference between an empty CD-ROM and a CD with 0 files but I can live
with that. What´s annoying is the system Alert. Is it possible to turn
it off somehow? Or is it possible to detect the floppy so the system
doesn´t notice that? I would prefer something as much system clean as
possible, no WD-1772 tricks, please.

Petr
--
E-mail: stehlik@cas3.zlin.vutbr.cz                        PARCP developer
   WWW: http://cas3.zlin.vutbr.cz/~stehlik/              MiNTOS/Linux user
mirror: http://users.zln.cz/~pstehlik/                 Atari 800XL emulation
mirror: http://www.stehlik.cyberstrider.org/              Atari Falcon040