#7279: ioctl FIONREAD should set errno to ENOTTY for non supported file descriptors ----------------------+----------------------- Reporter: korli | Owner: nobody Type: bug | Status: reopened Priority: normal | Milestone: R1 Component: System | Version: R1/alpha2 Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------+----------------------- Changes (by korli): * status: closed => reopened * resolution: fixed => Comment: Ingo mentioned on the commits list: {{{ This is not correct. FDTYPE_FILE means a vnode based file descriptor. Whether the particular ioctls are supported utterly depends on the vnode. E.g. FIFOs, while the implementation doesn't ATM, actually could support those. In case of devices -- and this includes the TTY driver -- the call is forwarded to the device's control() hook. The other listed FD types are also vnode based and apparently the common_ioctl() hook is called for them as well. Which is seriously broken, since they pass the wrong cookie to the vnode's hook. I'd use a new (no- op) hook for them and perhaps put the FIONBIO/FIONREAD check there. }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/7279#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.