X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fkeyboard.c;h=cf619676535ec6c756b6038c799bdb83c5bd43fd;hp=c05b00e06fca10bebd0c527751f04ff70518f50b;hb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;hpb=0e097100a26bc43eb8964734fa43130fc4c71429 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; }