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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]