termios: Do return EINVAL for bad action to tcsetattr()
Set errno for bad actions in tsetattr to catch bad actions. Sponsored by: Netflix
This commit is contained in:
@@ -22,7 +22,7 @@ int
|
||||
host_tcsetattr(int fd, int act, const struct host_termios *tio)
|
||||
{
|
||||
if (act < 0 || act > 2) {
|
||||
// errno = EINVAL; /* XXX ?? */
|
||||
errno = EINVAL; /* XXX ?? */
|
||||
return -1;
|
||||
}
|
||||
return host_ioctl(fd, HOST_TCSETS+act, (uintptr_t)tio);
|
||||
|
||||
Reference in New Issue
Block a user