From bf3f53be27a88686b8ca4ace62b9d9991bd91684 Mon Sep 17 00:00:00 2001 From: Jorrit Herder Date: Mon, 17 Oct 2005 13:19:48 +0000 Subject: [PATCH] Removed check if slot in use for keymapping: otherwise IS may have problems to recover. --- drivers/tty/keyboard.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/tty/keyboard.c b/drivers/tty/keyboard.c index 0404755ed..b82094aa8 100644 --- a/drivers/tty/keyboard.c +++ b/drivers/tty/keyboard.c @@ -436,26 +436,38 @@ message *m_ptr; /* pointer to the request message */ result = OK; /* assume everything will be ok*/ for (i=0; i < 12; i++) { /* check F1-F12 keys */ if (bit_isset(m_ptr->FKEY_FKEYS, i+1) ) { +#if DEAD_CODE + /* Currently, we don't check if the slot is in use, so that IS + * can recover after a crash by overtaking its existing mappings. + * In future, a better solution will be implemented. + */ if (fkey_obs[i].proc_nr == NONE) { +#endif fkey_obs[i].proc_nr = m_ptr->m_source; fkey_obs[i].events = 0; bit_unset(m_ptr->FKEY_FKEYS, i+1); +#if DEAD_CODE } else { printf("WARNING, fkey_map failed F%d\n", i+1); result = EBUSY; /* report failure, but try rest */ } +#endif } } for (i=0; i < 12; i++) { /* check Shift+F1-F12 keys */ if (bit_isset(m_ptr->FKEY_SFKEYS, i+1) ) { +#if DEAD_CODE if (sfkey_obs[i].proc_nr == NONE) { +#endif sfkey_obs[i].proc_nr = m_ptr->m_source; sfkey_obs[i].events = 0; bit_unset(m_ptr->FKEY_SFKEYS, i+1); +#if DEAD_CODE } else { printf("WARNING, fkey_map failed Shift F%d\n", i+1); result = EBUSY; /* report failure but try rest */ } +#endif } } break; -- 2.44.0