Actions
Bug #12872
closedioctl(2) needs additional ENOTTY documentation
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
While reviewing some driver code I noticed it was returning ENOTTY
for an invalid ioctl request. This threw me as I would have expected something more logical, like EINVAL
. When I looked at ioctl(2)
it said that a bad request should result in an EINVAL
, as I would have expected. I brought this up with Robert and sure enough this involves a bunch of UNIX history, but the end result is that drivers are supposed to return ENOTTY
for a invalid ioctl request (though it seems its EINVAL
for a STREAMS device, and that's what ioctl(2)
was documenting). As our ioctl(2)
documents both STREAMS and non-STREAMS devices, we should mention the ENOTTY
semantic.
Updated by Electric Monk about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 207eb048d59b803f49e5ebdbfdb1ed33848b198f
commit 207eb048d59b803f49e5ebdbfdb1ed33848b198f Author: Robert Mustacchi <rm@fingolfin.org> Date: 2020-06-25T18:15:43.000Z 12872 ioctl(2) needs additional ENOTTY documentation Reviewed by: Ryan Zezeski <ryan@zinascii.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
Actions