File Documentation/ioctl-numbers.txt documents the IOCTL "magic"
numbers already in use by the 2.1.15 kernel (that's 15, not 115).
This brings to mind 2 questions:
1. How accurate is this document today? A whole lotta changes have
been made to the kernel in the 7 months since this document was
written. Am I really on safe ground if I choose a number not listed
as already being in use?
My guess is that it probably isn't completely up to date. On the other
hand, it isn't a disaster if there's a conflict, since the main reason
for the ioctl's to be unique is so that something bad won't happen if
(for example) a CD-ROM ioctl is used on a file descriptor corresponding
to a serial port. This is nice, but isn't absolutely necessary.
2. Is there a way (other than trial-and-error) to determine if a
given "magic" number is already in use by the kernel?
Grep is your friend when touring through the kernel sources. :-)
- Ted
-
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.altern.org/andrebalsa/doc/lkml-faq.html