X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci.c;h=06ccb6ba668130578c30cba9d7f96aba726b8e29;hp=29c54358bd403511e7075f079e9a32d565200f28;hb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;hpb=0e097100a26bc43eb8964734fa43130fc4c71429 diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index 29c5435..06ccb6b 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -28,10 +28,13 @@ #include #include #include +#include #include #include + + #ifndef CONFIG_DEBUG_PCI #undef PrintDebug #define PrintDebug(fmt, args...) @@ -648,16 +651,17 @@ static struct v3_device_ops dev_ops = { -static int pci_init(struct guest_info * vm, void * cfg_data) { +static int pci_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { struct pci_internal * pci_state = V3_Malloc(sizeof(struct pci_internal)); int i = 0; + char * name = v3_cfg_val(cfg, "name"); PrintDebug("PCI internal at %p\n",(void *)pci_state); - struct vm_device * dev = v3_allocate_device("PCI", &dev_ops, pci_state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, pci_state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "PCI"); + PrintError("Could not attach device %s\n", name); return -1; }