DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Reference: https://lore.kernel.org/patchwork/patch/258361/
How is this useful?
Knowing that no error occurred but the ioctl() command was not recognized is a useful piece of information. Suppose, for example, I have nfds open character drivers in an array fd[]. Then I could do something like this:
...
for (i = 0; i < nfds; i++) {
ret = ioctl(fd[i], cmd, 00ul); /* No argument in this example */ if (ret < 0) {
int errcode = errno;
...
if (errcode != ENOTTY) { /* Other errors, including EINVAL, are fatal */
return -errcode }
}
else if (ret >= 0)
{ return OK; /* Success! */ } }
return -ENOENT;}
...