X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fkeyboard.c;h=cf619676535ec6c756b6038c799bdb83c5bd43fd;hb=5f0b4f8c5f9f53cea37dde072b37d09ba316487d;hp=c05b00e06fca10bebd0c527751f04ff70518f50b;hpb=28cfe68985ef4360c9bd7428a19c222b295e9d85;p=palacios.git diff --git a/palacios/src/devices/keyboard.c b/palacios/src/devices/keyboard.c index c05b00e..cf61967 100644 --- a/palacios/src/devices/keyboard.c +++ b/palacios/src/devices/keyboard.c @@ -23,6 +23,9 @@ #include #include +#include +#include +#include #ifndef CONFIG_DEBUG_KEYBOARD @@ -981,9 +984,9 @@ static struct v3_device_ops dev_ops = { -static int keyboard_init(struct guest_info * vm, void * cfg_data) { +static int keyboard_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { struct keyboard_internal * keyboard_state = NULL; - + char * name = v3_cfg_val(cfg, "name"); PrintDebug("keyboard: init_device\n"); @@ -999,10 +1002,10 @@ static int keyboard_init(struct guest_info * vm, void * cfg_data) { keyboard_state->mouse_enabled = 0; - struct vm_device * dev = v3_allocate_device("KEYBOARD", &dev_ops, keyboard_state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, keyboard_state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "KEYBOARD"); + PrintError("Could not attach device %s\n", name); return -1; }