]> Zhao Yanbai Git Server - minix.git/commitdiff
Removed check if slot in use for keymapping: otherwise IS may have problems
authorJorrit Herder <jnherder@minix3.org>
Mon, 17 Oct 2005 13:19:48 +0000 (13:19 +0000)
committerJorrit Herder <jnherder@minix3.org>
Mon, 17 Oct 2005 13:19:48 +0000 (13:19 +0000)
to recover.

drivers/tty/keyboard.c

index 0404755ed9d0ec7a0814b87d949c8f471943871c..b82094aa887fb8c94eab1c17d8cdab5c4806ceff 100644 (file)
@@ -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;