diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-07 08:45:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-07 12:31:56 +0200 |
commit | 153b26699ee10eb760816ca0d030fe4cd80e1ce7 (patch) | |
tree | e5a89ad9f7abc864f6a65af03289f7acb971f899 /cpukit/libcsupport/src/termios_posix_isig_handler.c | |
parent | libtests/tar0[12]: Add tar archive (diff) | |
download | rtems-153b26699ee10eb760816ca0d030fe4cd80e1ce7.tar.bz2 |
termios: Replace rtems_termios_isig_status_code
Merge the rtems_termios_isig_status_code and
rtems_termios_iproc_status_code enums into a single
rtems_termios_iproc_status_code which is now a part of the API.
Simplify rtems_termios_posix_isig_handler() to avoid unreachable code.
Close #3800.
Diffstat (limited to 'cpukit/libcsupport/src/termios_posix_isig_handler.c')
-rw-r--r-- | cpukit/libcsupport/src/termios_posix_isig_handler.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpukit/libcsupport/src/termios_posix_isig_handler.c b/cpukit/libcsupport/src/termios_posix_isig_handler.c index 5be2d10aa2..5f505fecb4 100644 --- a/cpukit/libcsupport/src/termios_posix_isig_handler.c +++ b/cpukit/libcsupport/src/termios_posix_isig_handler.c @@ -20,20 +20,20 @@ #include <signal.h> -rtems_termios_isig_status_code rtems_termios_posix_isig_handler( +rtems_termios_iproc_status_code rtems_termios_posix_isig_handler( unsigned char c, struct rtems_termios_tty *tty ) { - if (c == tty->termios.c_cc[VINTR]) { - raise(SIGINT); - return RTEMS_TERMIOS_ISIG_INTERRUPT_READ; - } + int sig; - if (c == tty->termios.c_cc[VQUIT]) { - raise(SIGQUIT); - return RTEMS_TERMIOS_ISIG_INTERRUPT_READ; + if ( c == tty->termios.c_cc[ VQUIT ] ) { + sig = SIGQUIT; + } else { + sig = SIGINT; } - return RTEMS_TERMIOS_ISIG_WAS_NOT_PROCESSED; + (void) raise( sig ); + + return RTEMS_TERMIOS_IPROC_INTERRUPT; } |