int val;
char *listenAddr = NULL;
int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM;
- virConfValuePtr list;
virDomainGraphicsDefPtr graphics = NULL;
if (hvm) {
}
if (!hvm && def->graphics == NULL) { /* New PV guests use this format */
- list = virConfGetValue(conf, "vfb");
- if (list && list->type == VIR_CONF_LIST &&
- list->list && list->list->type == VIR_CONF_STRING &&
- list->list->str) {
+ VIR_AUTOPTR(virString) vfbs = NULL;
+ int rc;
+
+ if ((rc = virConfGetValueStringList(conf, "vfb", false, &vfbs)) == 1) {
char vfb[MAX_VFB];
char *key = vfb;
- if (virStrcpyStatic(vfb, list->list->str) < 0) {
+ if (virStrcpyStatic(vfb, *vfbs) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("VFB %s too big for destination"),
- list->list->str);
+ *vfbs);
goto cleanup;
}
def->graphics[0] = graphics;
def->ngraphics = 1;
graphics = NULL;
+ } else {
+ if (xenHandleConfGetValueStringListErrors(rc) < 0)
+ goto cleanup;
}
}