Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4691 → Rev 4692

/branches/tracing/uspace/srv/kbd/ctl/pc.c
32,12 → 32,12
*/
/**
* @file
* @brief PC keyboard controller driver.
* @brief PC keyboard controller driver.
*/
 
#include <kbd.h>
#include <kbd/kbd.h>
#include <kbd/keycode.h>
#include <io/console.h>
#include <io/keycode.h>
#include <kbd_ctl.h>
#include <gsp.h>
 
188,7 → 188,7
 
void kbd_ctl_parse_scancode(int scancode)
{
kbd_ev_type_t type;
console_ev_type_t type;
unsigned int key;
int *map;
size_t map_length;
207,6 → 207,9
map = scanmap_e0;
map_length = sizeof(scanmap_e0) / sizeof(int);
break;
default:
map = NULL;
map_length = 0;
}
 
ds = ds_s;
213,12 → 216,12
 
if (scancode & 0x80) {
scancode &= ~0x80;
type = KE_RELEASE;
type = KEY_RELEASE;
} else {
type = KE_PRESS;
type = KEY_PRESS;
}
 
if (scancode < 0 || scancode >= map_length)
if ((scancode < 0) || ((size_t) scancode >= map_length))
return;
 
key = map[scancode];