> I am thinking about a registration facility
>
> ioctl_register( ... )
> ioctl_unregister( .... )
> /proc/ioctl_list
If these functions register callbacks, we can do away with a fair amount
of crufty switch code as well. I'd recommend that at least the ioctl
register functions (if not the syscall version) take an array of arguments
so that you can register multiple ioctls at once. Something like:
static const ioctl_reg my_ioctls[...] = {
....
}
void init_module()
{
...
ioctl_register(my_ioctls...);
...
}
void cleanup_module()
{
...
ioctl_unregister(my_ioctls...);
...
}
-- "Love the dolphins," she advised him. "Write by W.A.S.T.E.."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/