Date: Wed, 9 Apr 2025 21:17:54 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 085fc4555abd - main - termios: Do return EINVAL for bad action to tcsetattr() Message-ID: <202504092117.539LHstr078024@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504092117.539LHstr078024>