* 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:
parent
e523d3cfc1
commit
548836e4f8
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user