From nobody Sun Feb 8 06:53:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575469326; cv=none; d=zohomail.com; s=zohoarc; b=NVucZvjFx7pmtkrKNdWrLfarps2I+70EIymOCVsvaVEQoqGRNjMBow+ZsOqJlZLgnc1+SPWAkis1o+w2SRj0Jg393hyF4wCugoBGbM6ndW/d3qSeFI/lXsJ7HWWqI7ziBSQNN4c6Ki2jcByEBvxmPgzPRxLsCZz317nmHobHETo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575469326; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=41BIC4YAg5YSz6QfXqzP4V0454AN6ukyUiFAoLeRFqw=; b=KzmBDM7+gtaDZPbO02UgYK/ewhnbG1ASiZqZuNot4/67U23slXtVk5SDJr1Nbaj/MTvElcQ5sZoUoUFnTZQ4yapKc7uG8ggFhy/IMtqfjhvDud68oDpiQzR19P50R9taSMyWsJbMBdykmVcadc5vH4BUb3bvzHtoqyzXknpWjaY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575469326124119.65894818667334; Wed, 4 Dec 2019 06:22:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-347-utrZMZrINkWiLk7THs0-rg-1; Wed, 04 Dec 2019 09:22:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1CA11800C75; Wed, 4 Dec 2019 14:21:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA43E5C553; Wed, 4 Dec 2019 14:21:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 61B0A180CB3B; Wed, 4 Dec 2019 14:21:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB4ELmHe008279 for ; Wed, 4 Dec 2019 09:21:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1D88E67E62; Wed, 4 Dec 2019 14:21:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1801A608F7; Wed, 4 Dec 2019 14:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575469322; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=41BIC4YAg5YSz6QfXqzP4V0454AN6ukyUiFAoLeRFqw=; b=BHInODpc32tZDACmDyuNIhDBEvzyqCSzCXXNhkRhV3pjQbIi1Jhf/7MrIuT1HE9NZ1xxKS TerKypqHaIfUANMy8ub/b+YGYuen60MAIRrMM8h+IzWLTUEv76ExfAyPtv9REOFLUPLwXf zMdLcHt6E99LbNOlYS8mVHWjgk1zCsc= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 4 Dec 2019 14:21:04 +0000 Message-Id: <20191204142113.2961028-22-berrange@redhat.com> In-Reply-To: <20191204142113.2961028-1-berrange@redhat.com> References: <20191204142113.2961028-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 21/30] conf: drop virCapsPtr param from APIs for saving domains X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: utrZMZrINkWiLk7THs0-rg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Daniel P. Berrang=C3=A9 --- src/bhyve/bhyve_driver.c | 9 +-- src/bhyve/bhyve_process.c | 16 +----- src/conf/domain_conf.c | 7 +-- src/conf/domain_conf.h | 3 - src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 34 +++++------ src/libxl/libxl_migration.c | 6 +- src/lxc/lxc_driver.c | 39 ++++++------- src/lxc/lxc_process.c | 6 +- src/qemu/qemu_domain.c | 6 +- src/qemu/qemu_driver.c | 110 +++++++++++++++++------------------- src/qemu/qemu_hotplug.c | 8 +-- src/qemu/qemu_migration.c | 8 +-- src/qemu/qemu_process.c | 36 ++++++------ src/test/test_driver.c | 2 +- 15 files changed, 128 insertions(+), 164 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 0e627f2dc8..eecd6532f7 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -540,7 +540,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const cha= r *xml, unsigned int flag vm->persistent =3D 1; =20 if (virDomainDefSave(vm->newDef ? vm->newDef : vm->def, - privconn->xmlopt, caps, BHYVE_CONFIG_DIR) < 0) { + privconn->xmlopt, BHYVE_CONFIG_DIR) < 0) { virDomainObjListRemove(privconn->domains, vm); goto cleanup; } @@ -1063,7 +1063,6 @@ bhyveDomainSetMetadata(virDomainPtr dom, { bhyveConnPtr privconn =3D dom->conn->privateData; virDomainObjPtr vm; - virCapsPtr caps =3D NULL; int ret =3D -1; =20 virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | @@ -1075,10 +1074,7 @@ bhyveDomainSetMetadata(virDomainPtr dom, if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; =20 - if (!(caps =3D bhyveDriverGetCapabilities(privconn))) - goto cleanup; - - ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, caps, + ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, privconn->xmlopt, BHYVE_STATE_DIR, BHYVE_CONFIG_DIR, flags); =20 @@ -1090,7 +1086,6 @@ bhyveDomainSetMetadata(virDomainPtr dom, =20 =20 cleanup: - virObjectUnref(caps); virDomainObjEndAPI(&vm); return ret; } diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index c10e5500c9..519604f898 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -110,14 +110,9 @@ virBhyveProcessStart(virConnectPtr conn, bhyveConnPtr privconn =3D conn->privateData; bhyveDomainObjPrivatePtr priv =3D vm->privateData; int ret =3D -1, rc; - virCapsPtr caps =3D NULL; =20 logfile =3D g_strdup_printf("%s/%s.log", BHYVE_LOG_DIR, vm->def->name); =20 - caps =3D bhyveDriverGetCapabilities(privconn); - if (!caps) - goto cleanup; - if ((logfd =3D open(logfile, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { virReportSystemError(errno, @@ -211,14 +206,13 @@ virBhyveProcessStart(virConnectPtr conn, virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, reason); priv->mon =3D bhyveMonitorOpen(vm, driver); =20 - if (virDomainObjSave(vm, driver->xmlopt, caps, + if (virDomainObjSave(vm, driver->xmlopt, BHYVE_STATE_DIR) < 0) goto cleanup; =20 ret =3D 0; =20 cleanup: - virObjectUnref(caps); if (devicemap !=3D NULL) { rc =3D unlink(devmap_file); if (rc < 0 && errno !=3D ENOENT) @@ -384,7 +378,6 @@ virBhyveProcessReconnect(virDomainObjPtr vm, char *expected_proctitle =3D NULL; bhyveDomainObjPrivatePtr priv =3D vm->privateData; int ret =3D -1; - virCapsPtr caps =3D NULL; =20 if (!virDomainObjIsActive(vm)) return 0; @@ -392,10 +385,6 @@ virBhyveProcessReconnect(virDomainObjPtr vm, if (!vm->pid) return 0; =20 - caps =3D bhyveDriverGetCapabilities(data->driver); - if (!caps) - return -1; - virObjectLock(vm); =20 kp =3D kvm_getprocs(data->kd, KERN_PROC_PID, vm->pid, &nprocs); @@ -429,11 +418,10 @@ virBhyveProcessReconnect(virDomainObjPtr vm, vm->def->id =3D -1; virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_UNKNOWN); - ignore_value(virDomainObjSave(vm, data->driver->xmlopt, caps, + ignore_value(virDomainObjSave(vm, data->driver->xmlopt, BHYVE_STATE_DIR)); } =20 - virObjectUnref(caps); virObjectUnlock(vm); VIR_FREE(expected_proctitle); =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 011e104220..64084d37d5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28987,7 +28987,6 @@ virDomainDefSaveXML(virDomainDefPtr def, int virDomainDefSave(virDomainDefPtr def, virDomainXMLOptionPtr xmlopt, - virCapsPtr caps G_GNUC_UNUSED, const char *configDir) { g_autofree char *xml =3D NULL; @@ -29001,7 +29000,6 @@ virDomainDefSave(virDomainDefPtr def, int virDomainObjSave(virDomainObjPtr obj, virDomainXMLOptionPtr xmlopt, - virCapsPtr caps G_GNUC_UNUSED, const char *statusDir) { unsigned int flags =3D (VIR_DOMAIN_DEF_FORMAT_SECURE | @@ -30093,7 +30091,6 @@ virDomainObjSetMetadata(virDomainObjPtr vm, const char *metadata, const char *key, const char *uri, - virCapsPtr caps, virDomainXMLOptionPtr xmlopt, const char *stateDir, const char *configDir, @@ -30112,7 +30109,7 @@ virDomainObjSetMetadata(virDomainObjPtr vm, if (virDomainDefSetMetadata(def, type, metadata, key, uri) < 0) return -1; =20 - if (virDomainObjSave(vm, xmlopt, caps, stateDir) < 0) + if (virDomainObjSave(vm, xmlopt, stateDir) < 0) return -1; } =20 @@ -30121,7 +30118,7 @@ virDomainObjSetMetadata(virDomainObjPtr vm, uri) < 0) return -1; =20 - if (virDomainDefSave(persistentDef, xmlopt, caps, configDir) < 0) + if (virDomainDefSave(persistentDef, xmlopt, configDir) < 0) return -1; } =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 1aac01a386..a4d80c0863 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3280,7 +3280,6 @@ virDomainRedirdevDefPtr virDomainRedirdevDefRemove(vi= rDomainDefPtr def, size_t i =20 int virDomainDefSave(virDomainDefPtr def, virDomainXMLOptionPtr xmlopt, - virCapsPtr caps, const char *configDir) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) @@ -3288,7 +3287,6 @@ int virDomainDefSave(virDomainDefPtr def, =20 int virDomainObjSave(virDomainObjPtr obj, virDomainXMLOptionPtr xmlopt, - virCapsPtr caps, const char *statusDir) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) @@ -3538,7 +3536,6 @@ int virDomainObjSetMetadata(virDomainObjPtr vm, const char *metadata, const char *key, const char *uri, - virCapsPtr caps, virDomainXMLOptionPtr xmlopt, const char *stateDir, const char *configDir, diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 0ad511c373..ff9502d3bb 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1470,7 +1470,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_USER= ); } =20 - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto destroy_dom; =20 if (virAtomicIntInc(&driver->nactive) =3D=3D 1 && driver->inhibitCallb= ack) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 11a08ed68a..cdb1296aa3 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -453,7 +453,7 @@ libxlReconnectDomain(virDomainObjPtr vm, =20 libxlReconnectNotifyNets(vm->def); =20 - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Cannot update XML for running Xen guest %s", vm->def->na= me); =20 /* now that we know it's reconnected call the hook if present */ @@ -1188,7 +1188,7 @@ libxlDomainSuspend(virDomainPtr dom) VIR_DOMAIN_EVENT_SUSPENDED_PAUSED= ); } =20 - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 ret =3D 0; @@ -1242,7 +1242,7 @@ libxlDomainResume(virDomainPtr dom) VIR_DOMAIN_EVENT_RESUMED_UNPAUSED= ); } =20 - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 ret =3D 0; @@ -1667,7 +1667,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, virDomainDefSetMemoryTotal(persistentDef, newmem); if (persistentDef->mem.cur_balloon > newmem) persistentDef->mem.cur_balloon =3D newmem; - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->c= aps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->c= onfigDir); goto endjob; } =20 @@ -1700,7 +1700,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, if (flags & VIR_DOMAIN_MEM_CONFIG) { sa_assert(persistentDef); persistentDef->mem.cur_balloon =3D newmem; - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->c= aps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->c= onfigDir); goto endjob; } } @@ -2351,13 +2351,13 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned= int nvcpus, ret =3D 0; =20 if (flags & VIR_DOMAIN_VCPU_LIVE) { - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir)= < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after changing vcpus", vm->def->name); } } if (flags & VIR_DOMAIN_VCPU_CONFIG) { - if (virDomainDefSave(def, driver->xmlopt, cfg->caps, cfg->configDi= r) < 0) { + if (virDomainDefSave(def, driver->xmlopt, cfg->configDir) < 0) { VIR_WARN("Unable to save configuration of vm %s after changing= vcpus", vm->def->name); } @@ -2507,9 +2507,9 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned in= t vcpu, ret =3D 0; =20 if (flags & VIR_DOMAIN_AFFECT_LIVE) { - ret =3D virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->state= Dir); + ret =3D virDomainObjSave(vm, driver->xmlopt, cfg->stateDir); } else if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - ret =3D virDomainDefSave(targetDef, driver->xmlopt, cfg->caps, cfg= ->configDir); + ret =3D virDomainDefSave(targetDef, driver->xmlopt, cfg->configDir= ); } =20 endjob: @@ -2870,7 +2870,7 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const c= har *xml, unsigned int flag vm->persistent =3D 1; =20 if (virDomainDefSave(vm->newDef ? vm->newDef : vm->def, - driver->xmlopt, cfg->caps, cfg->configDir) < 0) { + driver->xmlopt, cfg->configDir) < 0) { virDomainObjListRemove(driver->domains, vm); goto cleanup; } @@ -4143,7 +4143,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const = char *xml, * update domain status forcibly because the domain status may be * changed even if we attach the device failed. */ - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir)= < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -4151,7 +4151,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const = char *xml, =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->caps, cfg->co= nfigDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -4233,7 +4233,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const = char *xml, * update domain status forcibly because the domain status may be * changed even if we attach the device failed. */ - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir)= < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -4241,7 +4241,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const = char *xml, =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->caps, cfg->co= nfigDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -4320,13 +4320,13 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, cons= t char *xml, * update domain status forcibly because the domain status may be * changed even if we attach the device failed. */ - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir)= < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) ret =3D -1; } =20 /* Finally, if no error until here, we can save config. */ if (!ret && (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->caps, cfg->co= nfigDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -6526,7 +6526,7 @@ libxlDomainSetMetadata(virDomainPtr dom, if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) goto cleanup; =20 - ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, cfg->cap= s, + ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, driver->xmlopt, cfg->stateDir, cfg->configDir, flags); =20 diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 0d10da1811..404c437a22 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -1324,7 +1324,7 @@ libxlDomainMigrationDstFinish(virConnectPtr dconn, if (!(vmdef =3D virDomainObjGetPersistentDef(driver->xmlopt, vm, N= ULL))) goto cleanup; =20 - if (virDomainDefSave(vmdef, driver->xmlopt, cfg->caps, cfg->config= Dir) < 0) + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0) goto cleanup; =20 event =3D virDomainEventLifecycleNewFromObj(vm, @@ -1336,7 +1336,7 @@ libxlDomainMigrationDstFinish(virConnectPtr dconn, event =3D NULL; } =20 - if (virDomainObjSave(vm, driver->xmlopt, cfg->caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 dom =3D virGetDomain(dconn, vm->def->name, vm->def->uuid, vm->def->id); @@ -1386,7 +1386,7 @@ libxlDomainMigrationSrcConfirm(libxlDriverPrivatePtr = driver, VIR_DOMAIN_PAUSED_MIGRATION); event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVE= NT_SUSPENDED, VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED); - ignore_value(virDomainObjSave(vm, driver->xmlopt, cfg->caps, c= fg->stateDir)); + ignore_value(virDomainObjSave(vm, driver->xmlopt, cfg->stateDi= r)); } goto cleanup; } diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 55945bafcd..3467b07538 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -444,7 +444,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char = *xml, unsigned int flags) vm->persistent =3D 1; =20 if (virDomainDefSave(vm->newDef ? vm->newDef : vm->def, - driver->xmlopt, driver->caps, cfg->configDir) < 0= ) { + driver->xmlopt, cfg->configDir) < 0) { virDomainObjListRemove(driver->domains, vm); goto cleanup; } @@ -678,7 +678,7 @@ static int lxcDomainSetMemoryFlags(virDomainPtr dom, un= signed long newmem, if (persistentDef->mem.cur_balloon > newmem) persistentDef->mem.cur_balloon =3D newmem; if (virDomainDefSave(persistentDef, - driver->xmlopt, driver->caps, cfg->config= Dir) < 0) + driver->xmlopt, cfg->configDir) < 0) goto endjob; } } else { @@ -705,14 +705,14 @@ static int lxcDomainSetMemoryFlags(virDomainPtr dom, = unsigned long newmem, } =20 def->mem.cur_balloon =3D newmem; - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->st= ateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 if (persistentDef) { persistentDef->mem.cur_balloon =3D newmem; if (virDomainDefSave(persistentDef, - driver->xmlopt, driver->caps, cfg->config= Dir) < 0) + driver->xmlopt, cfg->configDir) < 0) goto endjob; } } @@ -857,11 +857,11 @@ lxcDomainSetMemoryParameters(virDomainPtr dom, #undef VIR_SET_MEM_PARAMETER =20 if (def && - virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 if (persistentDef && - virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, cfg-= >configDir) < 0) + virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < = 0) goto endjob; /* QEMU and LXC implementations are identical */ =20 @@ -1967,12 +1967,12 @@ lxcDomainSetSchedulerParametersFlags(virDomainPtr d= om, } } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 =20 if (persistentDef) { - rc =3D virDomainDefSave(persistentDefCopy, driver->xmlopt, driver-= >caps, + rc =3D virDomainDefSave(persistentDefCopy, driver->xmlopt, cfg->configDir); if (rc < 0) goto endjob; @@ -2673,7 +2673,7 @@ lxcDomainSetBlkioParameters(virDomainPtr dom, } } =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) ret =3D -1; } =20 @@ -3030,7 +3030,7 @@ static int lxcDomainSuspend(virDomainPtr dom) VIR_DOMAIN_EVENT_SUSPENDED_PAUSED= ); } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; ret =3D 0; =20 @@ -3087,7 +3087,7 @@ static int lxcDomainResume(virDomainPtr dom) VIR_DOMAIN_EVENT_RESUMED_UNPAUSED= ); } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; ret =3D 0; =20 @@ -4740,7 +4740,7 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr do= m, * changed even if we failed to attach the device. For example, * a new controller may be created. */ - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { ret =3D -1; goto endjob; } @@ -4748,7 +4748,7 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr do= m, =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg-= >configDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -4822,7 +4822,7 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr do= m, if (lxcDomainUpdateDeviceConfig(vmdef, dev) < 0) goto endjob; =20 - if (virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg->configD= ir) < 0) + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0) goto endjob; =20 virDomainObjAssignDef(vm, vmdef, false, NULL); @@ -4908,7 +4908,7 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr do= m, * changed even if we failed to attach the device. For example, * a new controller may be created. */ - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { ret =3D -1; goto endjob; } @@ -4916,7 +4916,7 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr do= m, =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg-= >configDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -5207,7 +5207,6 @@ lxcDomainSetMetadata(virDomainPtr dom, virLXCDriverPtr driver =3D dom->conn->privateData; virDomainObjPtr vm; virLXCDriverConfigPtr cfg =3D NULL; - virCapsPtr caps =3D NULL; int ret =3D -1; =20 virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | @@ -5221,13 +5220,10 @@ lxcDomainSetMetadata(virDomainPtr dom, if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; =20 - if (!(caps =3D virLXCDriverGetCapabilities(driver, false))) - goto cleanup; - if (virLXCDomainObjBeginJob(driver, vm, LXC_JOB_MODIFY) < 0) goto cleanup; =20 - ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, caps, + ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, driver->xmlopt, cfg->stateDir, cfg->configDir, flags); =20 @@ -5241,7 +5237,6 @@ lxcDomainSetMetadata(virDomainPtr dom, =20 cleanup: virDomainObjEndAPI(&vm); - virObjectUnref(caps); virObjectUnref(cfg); return ret; } diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index e648d490c8..3688973abf 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -790,7 +790,7 @@ static void virLXCProcessMonitorInitNotify(virLXCMonito= rPtr mon G_GNUC_UNUSED, } virDomainAuditInit(vm, initpid, inode); =20 - if (virDomainObjSave(vm, lxc_driver->xmlopt, lxc_driver->caps, cfg->st= ateDir) < 0) + if (virDomainObjSave(vm, lxc_driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Cannot update XML with PID for LXC %s", vm->def->name); =20 virObjectUnlock(vm); @@ -1457,7 +1457,7 @@ int virLXCProcessStart(virConnectPtr conn, =20 /* Write domain status to disk for the controller to * read when it starts */ - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 /* Allow the child to exec the controller */ @@ -1696,7 +1696,7 @@ virLXCProcessReconnectDomain(virDomainObjPtr vm, =20 virLXCProcessReconnectNotifyNets(vm->def); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Cannot update XML for running LXC guest %s", vm->def= ->name); =20 /* now that we know it's reconnected call the hook if present */ diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 3abd37e25d..ee99759ded 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8189,7 +8189,7 @@ qemuDomainObjSaveStatus(virQEMUDriverPtr driver, virQEMUDriverConfigPtr cfg =3D virQEMUDriverGetConfig(driver); =20 if (virDomainObjIsActive(obj)) { - if (virDomainObjSave(obj, driver->xmlopt, driver->caps, cfg->state= Dir) < 0) + if (virDomainObjSave(obj, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Failed to save status on vm %s", obj->def->name); } =20 @@ -8221,7 +8221,7 @@ qemuDomainSaveConfig(virDomainObjPtr obj) =20 cfg =3D virQEMUDriverGetConfig(driver); =20 - if (virDomainDefSave(def, driver->xmlopt, driver->caps, cfg->configDir= ) < 0) + if (virDomainDefSave(def, driver->xmlopt, cfg->configDir) < 0) VIR_WARN("Failed to save config of vm %s", obj->def->name); } =20 @@ -10083,7 +10083,7 @@ qemuDomainSetFakeReboot(virQEMUDriverPtr driver, =20 priv->fakeReboot =3D value; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Failed to save status on vm %s", vm->def->name); =20 cleanup: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3b470d7b8..91cf3fb21a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1865,7 +1865,7 @@ static int qemuDomainSuspend(virDomainPtr dom) if (qemuProcessStopCPUs(driver, vm, reason, QEMU_ASYNC_JOB_NONE) <= 0) goto endjob; } - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; ret =3D 0; =20 @@ -1923,7 +1923,7 @@ static int qemuDomainResume(virDomainPtr dom) goto endjob; } } - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; ret =3D 0; =20 @@ -2365,7 +2365,7 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom,= unsigned long newmem, =20 if (persistentDef->mem.cur_balloon > newmem) persistentDef->mem.cur_balloon =3D newmem; - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver= ->caps, + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir); goto endjob; } @@ -2405,7 +2405,7 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom,= unsigned long newmem, =20 if (persistentDef) { persistentDef->mem.cur_balloon =3D newmem; - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver= ->caps, + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir); goto endjob; } @@ -2480,7 +2480,7 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPt= r dom, int period, } =20 def->memballoon->period =3D period; - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -2492,7 +2492,7 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPt= r dom, int period, goto endjob; } persistentDef->memballoon->period =3D period; - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver->ca= ps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->confi= gDir); goto endjob; } =20 @@ -4202,7 +4202,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver, =20 virObjectEventStateQueue(driver->domainEventState, event); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -4282,7 +4282,7 @@ processDeviceDeletedEvent(virQEMUDriverPtr driver, goto endjob; } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("unable to save domain status after removing device %s", devAlias); =20 @@ -4650,7 +4650,7 @@ processSerialChangedEvent(virQEMUDriverPtr driver, =20 dev.data.chr->state =3D newstate; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("unable to save status of domain %s after updating state = of " "channel %s", vm->def->name, devAlias); =20 @@ -4976,7 +4976,7 @@ qemuDomainSetVcpusMax(virQEMUDriverPtr driver, if (virDomainDefSetVcpusMax(persistentDef, nvcpus, driver->xmlopt) < 0) return -1; =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, cfg-= >configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < = 0) return -1; =20 return 0; @@ -5105,7 +5105,7 @@ qemuDomainPinVcpuLive(virDomainObjPtr vm, vcpuinfo->cpumask =3D tmpmap; tmpmap =3D NULL; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 if (g_snprintf(paramField, VIR_TYPED_PARAM_FIELD_LENGTH, @@ -5188,7 +5188,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom, vcpuinfo->cpumask =3D pcpumap; pcpumap =3D NULL; =20 - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver->ca= ps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->confi= gDir); goto endjob; } =20 @@ -5320,7 +5320,7 @@ qemuDomainPinEmulator(virDomainPtr dom, if (!(def->cputune.emulatorpin =3D virBitmapNewCopy(pcpumap))) goto endjob; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 str =3D virBitmapFormat(pcpumap); @@ -5340,7 +5340,7 @@ qemuDomainPinEmulator(virDomainPtr dom, if (!(persistentDef->cputune.emulatorpin =3D virBitmapNewCopy(pcpu= map))) goto endjob; =20 - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver->ca= ps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->confi= gDir); goto endjob; } =20 @@ -5800,7 +5800,7 @@ qemuDomainPinIOThread(virDomainPtr dom, if (virProcessSetAffinity(iothrid->thread_id, pcpumap) < 0) goto endjob; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 if (g_snprintf(paramField, VIR_TYPED_PARAM_FIELD_LENGTH, @@ -5833,7 +5833,7 @@ qemuDomainPinIOThread(virDomainPtr dom, iothrid->cpumask =3D cpumask; iothrid->autofill =3D false; =20 - ret =3D virDomainDefSave(persistentDef, driver->xmlopt, driver->ca= ps, cfg->configDir); + ret =3D virDomainDefSave(persistentDef, driver->xmlopt, cfg->confi= gDir); goto endjob; } =20 @@ -6251,7 +6251,7 @@ qemuDomainChgIOThread(virQEMUDriverPtr driver, =20 } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -6283,7 +6283,7 @@ qemuDomainChgIOThread(virQEMUDriverPtr driver, break; } =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < 0) goto endjob; } @@ -6887,7 +6887,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, "%s", _("failed to resume domain")); goto cleanup; } - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Failed to save status on vm %s", vm->def->name); goto cleanup; } @@ -7594,7 +7594,7 @@ qemuDomainDefineXMLFlags(virConnectPtr conn, vm->persistent =3D 1; =20 if (virDomainDefSave(vm->newDef ? vm->newDef : vm->def, - driver->xmlopt, driver->caps, cfg->configDir) < 0= ) { + driver->xmlopt, cfg->configDir) < 0) { if (oldDef) { /* There is backup so this VM was defined before. * Just restore the backup. */ @@ -8659,13 +8659,13 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr= vm, * changed even if we failed to attach the device. For example, * a new controller may be created. */ - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; } =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - if (virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg->con= figDir) < 0) + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0) goto cleanup; =20 virDomainObjAssignDef(vm, vmdef, false, NULL); @@ -8812,7 +8812,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr d= om, * changed even if we failed to attach the device. For example, * a new controller may be created. */ - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { ret =3D -1; goto endjob; } @@ -8820,7 +8820,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr d= om, =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - ret =3D virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg-= >configDir); + ret =3D virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir); if (!ret) { virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -8910,13 +8910,13 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPt= r driver, * changed even if we failed to attach the device. For example, * a new controller may be created. */ - if (virDomainObjSave(vm, driver->xmlopt, caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; } =20 /* Finally, if no error until here, we can save config. */ if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - if (virDomainDefSave(vmdef, driver->xmlopt, caps, cfg->configDir) = < 0) + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0) goto cleanup; =20 virDomainObjAssignDef(vm, vmdef, false, NULL); @@ -8994,7 +8994,7 @@ qemuDomainDetachDeviceAliasLiveAndConfig(virQEMUDrive= rPtr driver, } =20 if (vmdef) { - if (virDomainDefSave(vmdef, driver->xmlopt, caps, cfg->configDir) = < 0) + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0) goto cleanup; virDomainObjAssignDef(vm, vmdef, false, NULL); vmdef =3D NULL; @@ -9576,7 +9576,7 @@ qemuDomainSetBlkioParameters(virDomainPtr dom, } } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } if (ret < 0) @@ -9611,7 +9611,7 @@ qemuDomainSetBlkioParameters(virDomainPtr dom, } } =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) ret =3D -1; } =20 @@ -9841,11 +9841,11 @@ qemuDomainSetMemoryParameters(virDomainPtr dom, #undef VIR_SET_MEM_PARAMETER =20 if (def && - virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 if (persistentDef && - virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, cfg-= >configDir) < 0) + virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < = 0) goto endjob; /* QEMU and LXC implementations are identical */ =20 @@ -10108,7 +10108,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom, -1, mode, nodeset) < 0) goto endjob; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -10119,7 +10119,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom, -1, mode, nodeset) < 0) goto endjob; =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) goto endjob; } =20 @@ -10301,7 +10301,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom, VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO; } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -10315,7 +10315,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom, VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO; } =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) goto endjob; } =20 @@ -10513,7 +10513,6 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr = dom, int ret =3D -1; int rc; g_autoptr(virQEMUDriverConfig) cfg =3D NULL; - g_autoptr(virCaps) caps =3D NULL; qemuDomainObjPrivatePtr priv; virObjectEventPtr event =3D NULL; virTypedParameterPtr eventParams =3D NULL; @@ -10559,9 +10558,6 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr = dom, goto cleanup; } =20 - if (!(caps =3D virQEMUDriverGetCapabilities(driver, false))) - goto cleanup; - if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) goto cleanup; =20 @@ -10777,7 +10773,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr = dom, } } =20 - if (virDomainObjSave(vm, driver->xmlopt, caps, cfg->stateDir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 if (eventNparams) { @@ -10787,7 +10783,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr = dom, } =20 if (persistentDef) { - rc =3D virDomainDefSave(persistentDefCopy, driver->xmlopt, caps, + rc =3D virDomainDefSave(persistentDefCopy, driver->xmlopt, cfg->configDir); if (rc < 0) goto endjob; @@ -11626,7 +11622,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, goto endjob; } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 @@ -11651,7 +11647,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, } } =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) goto endjob; } =20 @@ -14612,7 +14608,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDri= verPtr driver, defdisk->src =3D g_steal_pointer(&newsrc); } =20 - if (virDomainDefSave(vm->def, driver->xmlopt, driver->caps, cfg->confi= gDir) < 0) + if (virDomainDefSave(vm->def, driver->xmlopt, cfg->configDir) < 0) goto cleanup; =20 ret =3D 0; @@ -15549,8 +15545,8 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr= driver, if (rc < 0) goto cleanup; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0 || - (vm->newDef && virDomainDefSave(vm->newDef, driver->xmlopt, driver= ->caps, + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0 || + (vm->newDef && virDomainDefSave(vm->newDef, driver->xmlopt, cfg->configDir) < 0)) goto cleanup; =20 @@ -16844,7 +16840,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, } if (ret =3D=3D 0 && defined && vm->persistent && !(ret =3D virDomainDefSave(vm->newDef ? vm->newDef : vm->def, - driver->xmlopt, driver->caps, cfg->config= Dir))) { + driver->xmlopt, cfg->configDir))) { detail =3D VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT; virObjectEventStateQueue(driver->domainEventState, virDomainEventLifecycleNewFromObj(vm, @@ -17649,7 +17645,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, job->state =3D QEMU_BLOCKJOB_STATE_ABORTING; } =20 - ignore_value(virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->s= tateDir)); + ignore_value(virDomainObjSave(vm, driver->xmlopt, cfg->stateDir)); =20 if (!async) { qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE); @@ -19227,7 +19223,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (virDomainDiskSetBlockIOTune(disk, &info) < 0) goto endjob; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 if (eventNparams) { @@ -19252,7 +19248,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (virDomainDiskSetBlockIOTune(conf_disk, &info) < 0) goto endjob; =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < 0) goto endjob; } @@ -19513,7 +19509,6 @@ qemuDomainSetMetadata(virDomainPtr dom, virQEMUDriverPtr driver =3D dom->conn->privateData; virDomainObjPtr vm; g_autoptr(virQEMUDriverConfig) cfg =3D NULL; - g_autoptr(virCaps) caps =3D NULL; int ret =3D -1; =20 virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | @@ -19527,13 +19522,10 @@ qemuDomainSetMetadata(virDomainPtr dom, if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; =20 - if (!(caps =3D virQEMUDriverGetCapabilities(driver, false))) - goto cleanup; - if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) goto cleanup; =20 - ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, caps, + ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, driver->xmlopt, cfg->stateDir, cfg->configDir, flags); =20 @@ -21854,7 +21846,7 @@ qemuDomainRenameCallback(virDomainObjPtr vm, vm->def->name =3D new_dom_name; new_dom_name =3D NULL; =20 - if (virDomainDefSave(vm->def, driver->xmlopt, driver->caps, cfg->confi= gDir) < 0) + if (virDomainDefSave(vm->def, driver->xmlopt, cfg->configDir) < 0) goto rollback; =20 if (virFileExists(old_dom_cfg_file) && @@ -22378,14 +22370,14 @@ qemuDomainSetLifecycleAction(virDomainPtr dom, =20 qemuDomainModifyLifecycleAction(def, type, action); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; } =20 if (persistentDef) { qemuDomainModifyLifecycleAction(persistentDef, type, action); =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < 0) goto endjob; } @@ -22681,7 +22673,7 @@ qemuDomainAgentSetResponseTimeout(virDomainPtr dom, QEMU_DOMAIN_PRIVATE(vm)->agentTimeout =3D timeout; =20 if (virDomainObjIsActive(vm) && - virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 ret =3D 0; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index da32a845e1..930f4283c8 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5980,7 +5980,7 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver, =20 qemuDomainVcpuPersistOrder(vm->def); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 ret =3D 0; @@ -6055,7 +6055,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriverPtr driver, =20 qemuDomainVcpuPersistOrder(vm->def); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 ret =3D 0; @@ -6313,7 +6313,7 @@ qemuDomainSetVcpusInternal(virQEMUDriverPtr driver, if (persistentDef) { qemuDomainSetVcpusConfig(persistentDef, nvcpus, hotpluggable); =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) goto cleanup; } =20 @@ -6513,7 +6513,7 @@ qemuDomainSetVcpuInternal(virQEMUDriverPtr driver, if (persistentDef) { qemuDomainSetVcpuConfig(persistentDef, map, state); =20 - if (virDomainDefSave(persistentDef, driver->xmlopt, driver->caps, = cfg->configDir) < 0) + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir= ) < 0) goto cleanup; } =20 diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 1a6c179999..c7f9acadeb 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1008,7 +1008,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriverPtr drive= r, tlsAlias, flags) < 0) return -1; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Failed to save status on vm %s", vm->def->name); return -1; } @@ -2976,7 +2976,7 @@ qemuMigrationSrcConfirmPhase(virQEMUDriverPtr driver, qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, priv->job.migParams, priv->job.apiFlags); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Failed to save status on vm %s", vm->def->name); } =20 @@ -4827,7 +4827,7 @@ qemuMigrationDstPersist(virQEMUDriverPtr driver, priv->qemuCaps))) goto error; =20 - if (virDomainDefSave(vmdef, driver->xmlopt, driver->caps, cfg->configD= ir) < 0 && + if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0 && !ignoreSaveError) goto error; =20 @@ -5080,7 +5080,7 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver, } =20 if (virDomainObjIsActive(vm) && - virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Failed to save status on vm %s", vm->def->name); =20 /* Guest is successfully running, so cancel previous auto destroy */ diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 0302d0489b..7a0cbc109f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -411,7 +411,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon G_GNUC_UNUSED, if (priv->agent) qemuAgentNotifyEvent(priv->agent, QEMU_AGENT_EVENT_RESET); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Failed to save status on vm %s", vm->def->name); =20 if (vm->def->onReboot =3D=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY || @@ -493,7 +493,7 @@ qemuProcessFakeReboot(void *opaque) goto endjob; } =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -614,7 +614,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon G_GNUC_UNU= SED, VIR_DOMAIN_EVENT_SHUTDOWN, detail); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -680,7 +680,7 @@ qemuProcessHandleStop(qemuMonitorPtr mon G_GNUC_UNUSED, VIR_WARN("Unable to release lease on %s", vm->def->name); VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -726,7 +726,7 @@ qemuProcessHandleResume(qemuMonitorPtr mon G_GNUC_UNUSE= D, VIR_DOMAIN_EVENT_RESUMED, eventDetail); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -769,7 +769,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon G_GNUC_UN= USED, offset +=3D vm->def->clock.data.variable.adjustment0; vm->def->clock.data.variable.adjustment =3D offset; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("unable to save domain status with RTC change"); } =20 @@ -812,7 +812,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon G_GNUC_UNU= SED, VIR_WARN("Unable to release lease on %s", vm->def->name); VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after watchdog event", vm->def->name); } @@ -904,7 +904,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon G_GNUC_UNUS= ED, VIR_WARN("Unable to release lease on %s", vm->def->name); VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("Unable to save status on vm %s after IO error", vm->= def->name); } virObjectUnlock(vm); @@ -1149,7 +1149,7 @@ qemuProcessHandleTrayChange(qemuMonitorPtr mon G_GNUC= _UNUSED, else if (reason =3D=3D VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE) disk->tray_status =3D VIR_DOMAIN_DISK_TRAY_CLOSED; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after tray moved even= t", vm->def->name); } @@ -1189,7 +1189,7 @@ qemuProcessHandlePMWakeup(qemuMonitorPtr mon G_GNUC_U= NUSED, VIR_DOMAIN_EVENT_STARTED, VIR_DOMAIN_EVENT_STARTED= _WAKEUP); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after wakeup event", vm->def->name); } @@ -1227,7 +1227,7 @@ qemuProcessHandlePMSuspend(qemuMonitorPtr mon G_GNUC_= UNUSED, VIR_DOMAIN_EVENT_PMSUSPENDED, VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after suspend event", vm->def->name); } @@ -1261,7 +1261,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon G_G= NUC_UNUSED, vm->def->mem.cur_balloon, actual); vm->def->mem.cur_balloon =3D actual; =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) VIR_WARN("unable to save domain status with balloon change"); =20 virObjectUnlock(vm); @@ -1296,7 +1296,7 @@ qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon G_G= NUC_UNUSED, VIR_DOMAIN_EVENT_PMSUSPENDED, VIR_DOMAIN_EVENT_PMSUSPENDED_DISK); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after suspend event", vm->def->name); } @@ -1669,7 +1669,7 @@ qemuProcessHandleMigrationStatus(qemuMonitorPtr mon G= _GNUC_UNUSED, VIR_DOMAIN_EVENT_SUSPEND= ED, VIR_DOMAIN_EVENT_SUSPEND= ED_POSTCOPY); =20 - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir) < 0) { + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) { VIR_WARN("Unable to save status on vm %s after state change", vm->def->name); } @@ -3105,7 +3105,7 @@ qemuProcessUpdateVideoRamSize(virQEMUDriverPtr driver, return -1; =20 cfg =3D virQEMUDriverGetConfig(driver); - ret =3D virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateD= ir); + ret =3D virDomainObjSave(vm, driver->xmlopt, cfg->stateDir); virObjectUnref(cfg); =20 return ret; @@ -6860,7 +6860,7 @@ qemuProcessLaunch(virConnectPtr conn, } =20 VIR_DEBUG("Writing early domain status to disk"); - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 VIR_DEBUG("Waiting for handshake from child"); @@ -7118,7 +7118,7 @@ qemuProcessFinishStartup(virQEMUDriverPtr driver, } =20 VIR_DEBUG("Writing domain status to disk"); - if (virDomainObjSave(vm, driver->xmlopt, driver->caps, cfg->stateDir) = < 0) + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto cleanup; =20 if (qemuProcessStartHook(driver, vm, @@ -8221,7 +8221,7 @@ qemuProcessReconnect(void *opaque) } =20 /* update domain state XML with possibly updated state in virDomainObj= */ - if (virDomainObjSave(obj, driver->xmlopt, driver->caps, cfg->stateDir)= < 0) + if (virDomainObjSave(obj, driver->xmlopt, cfg->stateDir) < 0) goto error; =20 /* Run an hook to allow admins to do some magic */ diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 02f6175e2f..788d5d3676 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4066,7 +4066,7 @@ static int testDomainSetMetadata(virDomainPtr dom, return -1; =20 ret =3D virDomainObjSetMetadata(privdom, type, metadata, key, uri, - privconn->caps, privconn->xmlopt, + privconn->xmlopt, NULL, NULL, flags); =20 if (ret =3D=3D 0) { --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list