[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]