Re: LANANA: To Pending Device Number Registrants

Chip Salzenberg (chip@valinux.com)
Tue, 15 May 2001 14:40:20 -0700


According to Alan Cox:
> Given a file handle 'X' how do I find out what ioctl groups I should
> apply to it.

Wouldn't it be better just to *try* ioctls and see which ones work and
which ones don't?

This ioctl situation reminds me of how novice programmers assume that
they have to call access() or stat() and check a file for existence
and readability before calling open(). But that's just stupid when
you think about it, because if the file isn't there and the open()
fails, that's OK! Failures are not fatal.

Similarly, ioctl failures are not fatal. Just Try Them.

-- 
Chip Salzenberg              - a.k.a. -             <chip@valinux.com>
 "We have no fuel on board, plus or minus 8 kilograms."  -- NEAR tech
-
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/