Thread (4 messages) 4 messages, 3 authors, 2008-11-04

Re: cleanup of hiddev

From: Jiri Slaby <hidden>
Date: 2008-11-04 22:57:09

Possibly related (same subject, not in this thread)

On 11/04/2008 11:51 PM, Oliver Neukum wrote:
If you call usb_register_dev() before you set
hiddev_table[usbhid->intf->minor - HIDDEV_MINOR_BASE]
this check in hiddev_open() may fail:
	if (i >= HIDDEV_MINORS || i < 0 || !hiddev_table[i])
		return -ENODEV;
I think, that's the point. You should also get ENODEV if you don't call
usb_register_dev(), create a node for non-existent minor manually and try to
open it. It behaves the same as if there was a lock you suggested...

Ex.:
# grep 137 /proc/devices
# mknod node c 137 0
# cat node
cat: node: No such device or address
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help