Floppy

Is there a C function to determine if a floppy has been properly inserted
into the drive or not?

Thanks in Advance,
Shashank

Shashank <sbalijepalli@precitech.com> wrote:

Is there a C function to determine if a floppy has been properly inserted
into the drive or not?

try reading the directory of the root of the floppy using
opendir() and readdir(). If that works, the floppy’s there,
if not, it’s not there.

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Adam Mallory <amallory@qnx.com> wrote:

Robert Krten <> nospam82@parse.com> > wrote in message
news:b5a215$49v$> 1@inn.qnx.com> …
Shashank <> sbalijepalli@precitech.com> > wrote:
Is there a C function to determine if a floppy has been properly
inserted
into the drive or not?

try reading the directory of the root of the floppy using
opendir() and readdir(). If that works, the floppy’s there,
if not, it’s not there.

What if it was a ‘quantum’ floppy - both there and not > :wink:

:slight_smile:

Actually; just realized that it might not necessarily be mounted
with a filesystem. In that case, best bet might be to read
the first block out of /dev/fd0 instead…

Cheers,
-RK

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Robert Krten <nospam82@parse.com> wrote in message
news:b5a215$49v$1@inn.qnx.com

Shashank <> sbalijepalli@precitech.com> > wrote:
Is there a C function to determine if a floppy has been properly
inserted
into the drive or not?

try reading the directory of the root of the floppy using
opendir() and readdir(). If that works, the floppy’s there,
if not, it’s not there.

What if it was a ‘quantum’ floppy - both there and not :wink:

-Adam