-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 20 Nov 2002 11:15, Ian Molton wrote:
> On Wed, 20 Nov 2002 10:39:45 +1100
>
> Brad Hards <[EMAIL PROTECTED]> wrote:
> > I'm not the maintainer, but my opinion is that if you have to use
> > them, do so.  If there is a better way, use that instead.
>
> If theres a better way to do ANYTHING do it instead.
OK, I was perhaps a bit vague.

If you have an ioctl that is performing a function that is basically "get 
data", then you probably wanted a read(2) type interface. You might want to 
do that via a /proc node, a sysfs entry, a char device, or your own 
filesystem. Which one you choose is a matter of the rest of your API design. 
As an example, if you wanted to get the version for particular device 
interface, you could possibly build that into a /proc interface. If you 
wanted the name of a device, and the interfaces it is bound to, you might 
choose to use sysfs.

If you have something that requires a query to be provided, and a response 
that depends on that query, you are probably in ioctl() land, as Alan pointed 
out. An example here is "make this key return thisother code".

Not withstanding this, given an existing body of code (in user space or kernel 
space), it is difficult to justify major API restructuring unless there is a 
significant design flaw (inherent races, ambiguous results, or the like).

Perhaps if you put up some specific, detailed examples, we could discuss them 
further?

Brad

- -- 
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE92u3FW6pHgIdAuOMRAjDvAJ9LYrNB78n+dqKmuTcrg/VBffF0xgCgrLcO
avIbfib6T4umPSjDpx8+huM=
=nYxR
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to