Re: LANANA: To Pending Device Number Registrants

H. Peter Anvin (hpa@transmeta.com)
Tue, 15 May 2001 15:19:12 -0700


Alan Cox wrote:
>
> > Wouldn't it be better just to *try* ioctls and see which ones work and
> > which ones don't?
>
> 1. We have overlaps
>

1. is of course a problem in itself. Someone who creates overlapping
ioctls should be spanked, hard.

> 2. I've seen code where people play clever ioctl tricks to deduce a device
> type and it ends up looking like one of those chemistry identification
> charts (hopefully minus do you see smoke ?)
>
> It should be clean and explicit

Agreed, but "determining type of device" and "determining if interface X
is available on this device" are different operations. If the latter is
what you want, you want to *explicitly* perform the latter operation.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
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/