What does errno 25 (ENOTTY) mean?

 
Could be also:
ConstantTypeOS
ERROR_SEEKWin32 errorWindows
KERN_MEMORY_RESTART_COPYKern returnMac
ippStsInsufficientEntropyIntel Ipp StatusAny
BAD_POOL_HEADERBugCheck CodeWindows
Previous Next
EMFILE ETXTBSY

ENOTTY

Why the name is historical

ENOTTY historically referred to an operation that required a terminal device. In modern UNIX-like systems it is commonly returned when an ioctl() request does not apply to the object referenced by the file descriptor. The descriptor may be valid, yet point to a regular file, socket, pipe, namespace, or device driver that does not implement that command.

It is therefore usually an API-contract mismatch, not an indication that a physical terminal is missing. A feature can also be unavailable because the active kernel, filesystem, driver, or library wrapper does not support the requested ioctl.

How to investigate

  • Record the ioctl request constant, descriptor origin, and object type.
  • Verify that the descriptor is for the device or filesystem the operation expects, rather than merely checking that it is open.
  • Check documented kernel, driver, and filesystem support for the exact command and version.
  • Provide a capability check or explicit unsupported-feature path instead of treating every ENOTTY as a transient error.

References


Looking for a different code? Search another status or error code.