linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'detect' floppy hardware from userland?  ioctl?
@ 2001-08-17 21:31 Jeff Meininger
  2001-08-17 21:33 ` Justin A
  2001-08-20  7:18 ` Helge Hafting
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Meininger @ 2001-08-17 21:31 UTC (permalink / raw)
  To: linux-kernel


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?

Thanks.
BTW, I'm not a list member, please Cc: my address!
-Jeff M


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'detect' floppy hardware from userland?  ioctl?
  2001-08-17 21:31 'detect' floppy hardware from userland? ioctl? Jeff Meininger
@ 2001-08-17 21:33 ` Justin A
  2001-08-17 21:39   ` Jeff Meininger
  2001-08-20  7:18 ` Helge Hafting
  1 sibling, 1 reply; 5+ messages in thread
From: Justin A @ 2001-08-17 21:33 UTC (permalink / raw)
  To: Jeff Meininger; +Cc: linux-kernel

grep fd /proc/devices
:)

-Justin

On Fri, Aug 17, 2001 at 04:31:27PM -0500, 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?
> 
> Thanks.
> BTW, I'm not a list member, please Cc: my address!
> -Jeff M
> 
> -
> 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'detect' floppy hardware from userland?  ioctl?
  2001-08-17 21:33 ` Justin A
@ 2001-08-17 21:39   ` Jeff Meininger
  2001-08-18 17:35     ` Dominik Kubla
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Meininger @ 2001-08-17 21:39 UTC (permalink / raw)
  To: Justin A; +Cc: linux-kernel



> grep fd /proc/devices
> :)

That only tells me 'fd'... I want to know 'fd0', 'fd1', etc...

-Jeff M


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'detect' floppy hardware from userland?  ioctl?
  2001-08-17 21:39   ` Jeff Meininger
@ 2001-08-18 17:35     ` Dominik Kubla
  0 siblings, 0 replies; 5+ messages in thread
From: Dominik Kubla @ 2001-08-18 17:35 UTC (permalink / raw)
  To: Jeff Meininger; +Cc: Justin A, linux-kernel

On Fri, Aug 17, 2001 at 04:39:51PM -0500, Jeff Meininger wrote:
> 
> 
> > grep fd /proc/devices
> > :)
> 
> That only tells me 'fd'... I want to know 'fd0', 'fd1', etc...

The fdutils package does that: see the /usr/sbin/MAKEFLOPPIES script

Yours,
  Dominik Kubla
-- 
ScioByte GmbH, Zum Schiersteiner Grund 2, 55127 Mainz (Germany)
Phone: +49 6131 550 117  Fax: +49 6131 610 99 16

GnuPG: 717F16BB / A384 F5F1 F566 5716 5485  27EF 3B00 C007 717F 16BB

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'detect' floppy hardware from userland?  ioctl?
  2001-08-17 21:31 'detect' floppy hardware from userland? ioctl? Jeff Meininger
  2001-08-17 21:33 ` Justin A
@ 2001-08-20  7:18 ` Helge Hafting
  1 sibling, 0 replies; 5+ messages in thread
From: Helge Hafting @ 2001-08-20  7:18 UTC (permalink / raw)
  To: Jeff Meininger, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-20  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-17 21:31 'detect' floppy hardware from userland? ioctl? Jeff Meininger
2001-08-17 21:33 ` Justin A
2001-08-17 21:39   ` Jeff Meininger
2001-08-18 17:35     ` Dominik Kubla
2001-08-20  7:18 ` Helge Hafting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).