Re: LANANA: To Pending Device Number Registrants

H. Peter Anvin
2001-05-15T22:20:28Z

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."