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

RE: [MiNT] getmntent



The only portable way to do this is to either use 'LONG drvbitmap =
DSetdrv(DGetdrv());', or to access drive U: when available.

Detecting whether a medium is there will always require drive accesses which
might be slow when nothing is in.

The drive change dialog can be avoided by suppressing the CEH.

Diagnostic XHDI messages shouldn't appear in a production binary...

--
Julian F. Reschke (mailto:reschke@medicaldataservice.de)
MedicalData Service GmbH Münster, Germany

> -----Original Message-----
> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Petr Stehlik
> Sent: Thursday, September 23, 1999 10:23 AM
> To: mint@fishpool.com
> Subject: [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
>
>
>
>
>