[Libvirt-cim] [PATCH] Make sure to create a default emulator device for XenFV domains
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Tue Apr 15 19:37:35 UTC 2008
>
> +static bool fv_default_emulator(struct domain *domain)
> +{
> + const char *emul = XEN_EMULATOR;
> +
> + cleanup_virt_device(domain->dev_emu);
> +
> + domain->dev_emu = calloc(1, sizeof(*domain->dev_emu));
> + if (domain->dev_emu == NULL) {
> + CU_DEBUG("Failed to allocate default emulator device");
> + return 0;
This function returns a bool, so this should technically be return false.
> + }
> +
> + domain->dev_emu->type = CIM_RES_TYPE_EMU;
> + domain->dev_emu->dev.emu.path = strdup(emul);
> + domain->dev_emu->id = strdup("emulator");
> +
> + return 1;
Also, this should be return true.
No complaints otherwise.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list