From nobody Sun Feb 8 22:08:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1568982089; cv=none; d=zoho.com; s=zohoarc; b=Ccsu0r5IrlU7b7KScg4iqA8AHH0cCd7nc0kMCV3zjC44P/ty7AOSHMlWdo0aG6baWjXG0JEwtpIzdf0l8aveq5eqll/tZUaSM/cACUFfPL6uX4UbLuC+6F5MmFe0UhhTL9R8sBWIX284J+sMnPH/4xjzMrGhUU+d9K9gELNFu5M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568982089; 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:ARC-Authentication-Results; bh=pxn7YTWlUmQn0IpT9QgF2iKQQHXSxfz70tCqXRt6hlo=; b=cFONxYsAWIdOnv/UCuPPH5qBgCy2vzcJgIlHgGc4Fy2AjEu0JsrteiJV17mfhG6mNBvMV/j4yEG2EBf2fT+SabKMdvj8DmGAo9mxFuiuo6JXv4/nvmQyoHckrlVZWnpmaa+WWwxrFPGckuclkXeMwRoUNuPN5u0Tp6LMWBox+RY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568982089438770.9649600963701; Fri, 20 Sep 2019 05:21:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A68C590C99; Fri, 20 Sep 2019 12:21:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 840755D9C3; Fri, 20 Sep 2019 12:21:27 +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 46B944EE6A; Fri, 20 Sep 2019 12:21:27 +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 x8KCLQ6m006741 for ; Fri, 20 Sep 2019 08:21:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0EA94608C2; Fri, 20 Sep 2019 12:21:26 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CE6D60920 for ; Fri, 20 Sep 2019 12:21:25 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 20 Sep 2019 14:21:15 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/7] conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 20 Sep 2019 12:21:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 7 +++---- src/conf/checkpoint_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 5c998267aa..a83863adcc 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -532,8 +532,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr = def, int -virDomainCheckpointRedefinePrep(virDomainPtr domain, - virDomainObjPtr vm, +virDomainCheckpointRedefinePrep(virDomainObjPtr vm, virDomainCheckpointDefPtr *defptr, virDomainMomentObjPtr *chk, virDomainXMLOptionPtr xmlopt, @@ -544,13 +543,13 @@ virDomainCheckpointRedefinePrep(virDomainPtr domain, virDomainMomentObjPtr other =3D NULL; virDomainCheckpointDefPtr otherdef =3D NULL; - virUUIDFormat(domain->uuid, uuidstr); + virUUIDFormat(vm->def->uuid, uuidstr); if (virDomainCheckpointCheckCycles(vm->checkpoints, def, vm->def->name= ) < 0) return -1; if (!def->parent.dom || - memcmp(def->parent.dom->uuid, domain->uuid, VIR_UUID_BUFLEN)) { + memcmp(def->parent.dom->uuid, vm->def->uuid, VIR_UUID_BUFLEN)) { virReportError(VIR_ERR_INVALID_ARG, _("definition for checkpoint %s must use uuid %s"), def->parent.name, uuidstr); diff --git a/src/conf/checkpoint_conf.h b/src/conf/checkpoint_conf.h index 47ff69eb4d..2be041ff56 100644 --- a/src/conf/checkpoint_conf.h +++ b/src/conf/checkpoint_conf.h @@ -90,8 +90,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr de= f, int virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr checkpoint); -int virDomainCheckpointRedefinePrep(virDomainPtr domain, - virDomainObjPtr vm, +int virDomainCheckpointRedefinePrep(virDomainObjPtr vm, virDomainCheckpointDefPtr *def, virDomainMomentObjPtr *checkpoint, virDomainXMLOptionPtr xmlopt, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 21ab58e4ec..ad14b864f7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17313,7 +17313,7 @@ qemuDomainCheckpointCreateXML(virDomainPtr domain, goto cleanup; if (redefine) { - if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk, + if (virDomainCheckpointRedefinePrep(vm, &def, &chk, driver->xmlopt, &update_current) < 0) goto endjob; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 9df7840390..dafd8c8daa 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9073,7 +9073,7 @@ testDomainCheckpointCreateXML(virDomainPtr domain, goto cleanup; if (redefine) { - if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk, + if (virDomainCheckpointRedefinePrep(vm, &def, &chk, privconn->xmlopt, &update_current) < 0) goto cleanup; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list