git: 085fc4555abd - main - termios: Do return EINVAL for bad action to tcsetattr()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Apr 2025 21:17:54 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=085fc4555abde267bd2f5fc7d2eb8bd98d8399f4
commit 085fc4555abde267bd2f5fc7d2eb8bd98d8399f4
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-04-09 21:16:55 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-04-09 21:16:55 +0000
termios: Do return EINVAL for bad action to tcsetattr()
Set errno for bad actions in tsetattr to catch bad actions.
Sponsored by: Netflix
---
stand/kboot/libkboot/termios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stand/kboot/libkboot/termios.c b/stand/kboot/libkboot/termios.c
index ec62170a44c9..cd25b252f735 100644
--- a/stand/kboot/libkboot/termios.c
+++ b/stand/kboot/libkboot/termios.c
@@ -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);