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