diff --git a/src/tty.c b/src/tty.c index ae6f1a9..3b40e08 100644 --- a/src/tty.c +++ b/src/tty.c @@ -144,9 +144,11 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c case KEY_SHIFT_L: if (ioctl(fd, TIOCMGET, &state) < 0) + { error_printf("Could not get line state: %s", strerror(errno)); + break; + } tio_printf("Lines state:"); - tio_printf(" DTR: %s", (state & TIOCM_DTR) ? "HIGH" : "LOW"); tio_printf(" RTS: %s", (state & TIOCM_RTS) ? "HIGH" : "LOW"); tio_printf(" CTS: %s", (state & TIOCM_CTS) ? "HIGH" : "LOW");