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

RE: [MiNT] removable medias



> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Petr Stehlik
> Sent: Sunday, February 28, 1999 7:08 PM
> To: MiNT list
> Subject: [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.

First of all, this is exactly why SPIN is treating an empty drive identical
to a "blank" CD. This is usually more convenient than seeing the critical
error handler.

If you want to get rid of the critical error handle, you can just install a
dummy one. I can send some sample code tomorrow, in case you need that.

Regards, jr