mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
dont show line state if ioctl failed
This commit is contained in:
parent
04d92740f5
commit
5217d9842b
1 changed files with 3 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue