> ENOTTY is used by several non-serial devices (or file systems) to
> object to an unrecognized ioctl command. There's also ENOIOCTLCMD
> (apparently supposed to be a non-user errno, but i don't see where it
> gets changed to something else) and EINVAL. I'm not sure what the
> rationale is for choosing among them; perhaps someone would elucidate?
ENOIOCTLCMD is something I've never met in the kernel. Normal reaction
to unrecognized ioctl() is ENOTTY, for a lot of reasons, starting with
the fact that ioctls are last-ditch API to be used when you just can't
think of better one and historically TTY had the earliest (and largest)
infestation. IOW, "not a tty" used to mean "WTF are you using ioctls here?"
OTOH, EINVAL is a catch-all thing for "something is wrong with arguments".
-
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/