X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2F8259a.c;h=443fb0aacdfddcc060a07a984c7875ab3d7e52c6;hp=d1944f648b156278ddda636ba84edfdc872855b7;hb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;hpb=0e097100a26bc43eb8964734fa43130fc4c71429 diff --git a/palacios/src/devices/8259a.c b/palacios/src/devices/8259a.c index d1944f6..443fb0a 100644 --- a/palacios/src/devices/8259a.c +++ b/palacios/src/devices/8259a.c @@ -715,15 +715,17 @@ static struct v3_device_ops dev_ops = { -static int pic_init(struct guest_info * vm, void * cfg_data) { +static int pic_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { struct pic_internal * state = NULL; state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); + char * name = v3_cfg_val(cfg, "name"); + V3_ASSERT(state != NULL); - struct vm_device * dev = v3_allocate_device("8259A", &dev_ops, state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "8259A"); + PrintError("Could not attach device %s\n", name); return -1; }