diff options
Diffstat (limited to 'src/unix/tty.c')
-rw-r--r-- | src/unix/tty.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/unix/tty.c b/src/unix/tty.c index 793054ba..b8610720 100644 --- a/src/unix/tty.c +++ b/src/unix/tty.c @@ -284,6 +284,11 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { int fd; int rc; + if (uv__is_raw_tty_mode(mode)) { + /* There is only a single raw TTY mode on UNIX. */ + mode = UV_TTY_MODE_RAW; + } + if (tty->mode == (int) mode) return 0; @@ -324,6 +329,8 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { case UV_TTY_MODE_IO: uv__tty_make_raw(&tmp); break; + default: + UNREACHABLE(); } /* Apply changes after draining */ |