* if ioctl hook wasn't found, now returns B_DEV_INVALID_IOCTL

* in case fd_ioctl() was about to return B_DEV_INVALID_IOCTL, translate to ENOTTY to satisfy #7279.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40787 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2011-03-02 18:58:14 +00:00
parent e523d3cfc1
commit 548836e4f8
2 changed files with 5 additions and 2 deletions

View File

@ -518,7 +518,10 @@ fd_ioctl(bool kernelFD, int fd, uint32 op, void* buffer, size_t length)
if (descriptor->ops->fd_ioctl)
status = descriptor->ops->fd_ioctl(descriptor, op, buffer, length);
else
status = B_NOT_SUPPORTED;
status = B_DEV_INVALID_IOCTL;
if (status == B_DEV_INVALID_IOCTL)
status = ENOTTY;
put_fd(descriptor);
return status;

View File

@ -5858,7 +5858,7 @@ common_ioctl(struct file_descriptor* descriptor, uint32 op, void* buffer,
if (HAS_FS_CALL(vnode, ioctl))
return FS_CALL(vnode, ioctl, descriptor->cookie, op, buffer, length);
return B_NOT_SUPPORTED;
return B_DEV_INVALID_IOCTL;
}