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

[MiNT] Detecting serial-devices



Hi!

This is an excerpt from a discussion between Frank Naumann and myself:

-----------8<-----------

> Fine by me. But I can see one disadvantage in using ioctls in the first
> place - you'll have to open the device first. This means (AFAIK) that you
> can't get any information on locked devices. Not a big problem though, but
> something like Dpathconf() on /dev (like you suggested) would be nice to
> have. It doesn't have to be restricted to serialdevices either, although I
> don't have any specific ideas for other uses (yet).

Hmm, better we discuss this on the MiNT-List.

Tschuess
   ...Frank

--------------8<-----------

The basic idea is to have some call (or perhaps an extension to existing
calls if that's more appropriate) to retrieve information about devices (in
this case serial-devices) without opening them. Does anybody have any
thoughts about this?

It would be very handy to have something like this, especially when creating
GUIs where you have to present a set of valid arguments or values to the
user. Using ioctls has the disadvantage that you won't be able to get
information about locked devices, and also that you will lock the device
during your query.


Jo Even Skarstein