FKEY_EVENTS cleanups

- Fix a bug where an FKEY_EVENT request would always return EINVAL

 - Replace two manual usage of FKEY_EVENT messages by a call to
   fkey_events which is mapped to fkey_ctl.

Change-Id: I7bc54cade45a29f14c89313b3ec4c28d81a4ec93
This commit is contained in:
2014-07-28 17:05:51 +02:00
parent bfff07c918
commit e2e57d387f
3 changed files with 21 additions and 14 deletions
+5 -5
View File
@@ -389,7 +389,8 @@ static void or_reset() {
static void or_dump (message *m)
{
t_or *orp;
int sfkeys;
orp = &or_state;
if(orp->or_mode == OR_M_DISABLED) {
@@ -399,12 +400,11 @@ static void or_dump (message *m)
if(orp->or_mode != OR_M_ENABLED)
return;
m->m_type = TTY_FKEY_CONTROL;
m->FKEY_REQUEST = FKEY_EVENTS;
if(OK!=(ipc_sendrec(TTY_PROC_NR,m)) )
if(OK != fkey_events(NULL, &sfkeys)) {
printf("Contacting the TTY failed\n");
}
if(bit_isset(m->FKEY_SFKEYS, 11)) {
if(bit_isset(sfkeys, 11)) {
print_linkstatus(orp, orp->last_linkstatus);
}
}