Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/9pfs: Return ENOTTY on terminal ioctl calls
Some applications (e.g. python) will use `ioctl()` calls to check if an interactive interpretor should be started or if a file should be read. `9pfs` should respond to all terminal-related calls with an `ENOTTY` error, so applications know that they are not running in an interactive environment. In order to detect the ioctl request type, add a new macro, `IOCTL_CMD_ISTYPE(cmd, type)`, which will check the corresponding bytes from the request number (an enhanced version of the Linux `_IOC_TYPE`). Signed-off-by: Stefan Jumarea <[email protected]> Reviewed-by: Sergiu Moga <[email protected]> Approved-by: Simon Kuenzer <[email protected]> GitHub-Closes: unikraft#1098
- Loading branch information