Re: LANANA: To Pending Device Number Registrants

From: Chip Salzenberg (chip@valinux.com)
Date: Tue May 15 2001 - 16:40:20 EST


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/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:45 EST