Re: 'detect' floppy hardware from userland? ioctl?

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Mon Aug 20 2001 - 02:18:40 EST


Jeff Meininger wrote:
>
> I'm writing an app that needs to know what floppy drives are connected to
> the system. Right now, I'm parsing the output of 'dmesg', but 'dmesg' can
> fill up so that the part where floppy drives are listed is no longer
> available. Is there an ioctl or some other interface for discovering fd0,
> fd1, etc?
>

You have got some replies already. Another way of detection is
to run devfs, you may do a "ls /dev/floppy" and get
0, 1, 2, ...
devfs report exactly the devices you have, not the devices
you _may_ have. Note that you don't have to convert
your system to use devfs if you don't want to - you can
mount devfs some other place than /dev if all you want
is detection.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:33 EST