commit 28b641c39e2610261f35ddea84425b20164dd04e (patch)
parent be213d544f46e971c1a61a0d2f49f49a134726c1
Author: Alex Karle <alex@alexkarle.com>
Date: Sat, 24 Apr 2021 00:43:09 -0400
kiosk: Reduce verbosity of /dev/tty error message
err prints the actual error:
choice> kiosk: unable to open tty: Device not configured
Which is great, but a user should only see "unable to open tty"
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kiosk.c b/src/kiosk.c
@@ -72,7 +72,7 @@ void prompt(int n) {
FILE *tty = fopen("/dev/tty", "r");
if (tty == NULL)
- err(1, "unable to open tty");
+ errx(1, "unable to open tty");
char *line = NULL;
size_t line_len;
ssize_t nread = getline(&line, &line_len, tty);