[libvirt] [PATCHv3 1/2] VMware: Support more than 2 driver backends

Ján Tomko jtomko at redhat.com
Fri Sep 27 10:33:32 UTC 2013


On 09/24/2013 06:24 PM, Doug Goldstein wrote:

> +    driver->type = -1;
> +    for (i = 0; i < VMWARE_DRIVER_LAST; i++) {
> +        if (STREQ(tmp, vmwareDriverTypeToString(i)))
> +            driver->type = i;
> +    }
> +

You can use virEnumFromString for this:
driver->type = vmwareDriverTypeFromString(tmp);

Jan




More information about the libvir-list mailing list