Description of problem:
I just installed kernel-22.214.171.124-0.fc15.x86_64.rpm
and I found that ioctl on an invalid I_ATMARK now sets errno to ENOTTY.
This is not POSIX compliant, man 3 ioctl says that EINVAL (Invalid argument)
should be put in errno if the I_ATMARK command fails.
Instead now ENOTTY (Inappropriate ioctl for device) is given as errno.
Version-Release number of selected component (if applicable):
int n, s, optval;
if( s == -1 ) perror("errno from socket:");
perror("errno from ioctl");
if( errno != EINVAL) printf("n=%d errno=%d\n",n,errno);
Steps to Reproduce:
Inappropriate ioctl for device
Invalid argument (EINVAL)
Until 126.96.36.199-35 ioctl gave the correct errno.
This is running sockioctl01 from ltp-full-20110606.
You should file this upstream.
(In reply to comment #3)
> This is not POSIX compliant, man 3 ioctl says that EINVAL (Invalid argument)
> should be put in errno if the I_ATMARK command fails.
I_ATMARK is for POSIX STREAMS devices and is not the same as SIOCATMARK, which takes no arguments. In any case I'm pretty sure ENOTTY is correct if you're trying to use it on a datagram socket.