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

[MiNT] getmntent



Hi,

I'd need help with writting a function that would list all logical disk
drives. That function should be able to detect if a removable drive
(floppy, SyQuest, ZIP, CD-ROM, ...) does not contain a media and should
not include such drive in the list. The function should not take several
long seconds, should not invoke the famous "Insert A: into B: or vice
versa" dialog, should not fill the screen with warnings or errors (like
"XHDI: tried to access something outside a range") and naturally should
not crash the computer. Finally, it should work under both TOS and MiNT.

I know I can do things like 'LONG drvbitmap = DSetdrv(DGetdrv());'.
I also know I can check a variable at 0x4c2 (typing from memory) that
contains the number of attached floppy drives and so I can clear the
second bit in drvbitmap. What I don't know is how to quickly and properly
detect the status or removable drives/medias (without timeouts, error
messages and even crashes).

Such function could become a worth part of MiNTlibs eventually.

Thanks in advance.

Petr