From nobody Sun Feb 8 09:27:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1642011094; cv=none; d=zohomail.com; s=zohoarc; b=beDNlbBuc5Qaed1tUtUF5juvWSLTVJ2HB+1JZFOehMiWs4MdFs0xpa4s1LyxmIrjFJy/7iUav8//XfDnNhGwp4EO7QrB67HUihXFveRtiU4MsG4g/hCyeFHylQhAtt3g8YivGuZL1wCa7wcESU9pOlHVb7q0yRi6ch+ey7dLjCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642011094; 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=gWYISFxSyydrpcjaqCYDIV+2dQtXbKt1dxK4Lux/GFw=; b=kniqvgrZgNYn/0h19tt5ftJQqhNvALsgwjSOQOnPmnalE8Fb0cJAPheLJh8XGLVAjqBN0I5uICD0ztoCm1paJv++E4W8+gjh9eiX6Kq7VKCvDDqONXiA8y2XAV46GAy+hcm7UfgGzV8PNjNL+/PWd1t14XCaOEL4hNJeRrzohN4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 164201109429935.9896599711559; Wed, 12 Jan 2022 10:11:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-330-FH__qxQ7MVab9bK87hI3ZQ-1; Wed, 12 Jan 2022 13:11:32 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B87BF100C66D; Wed, 12 Jan 2022 18:11:26 +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 5229A77C86; Wed, 12 Jan 2022 18:11:26 +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 22AB51806D2D; Wed, 12 Jan 2022 18:11:26 +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 20CIAm8G003146 for ; Wed, 12 Jan 2022 13:10:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id D66638AC23; Wed, 12 Jan 2022 18:10:48 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FEFB8AC21 for ; Wed, 12 Jan 2022 18:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642011093; 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=gWYISFxSyydrpcjaqCYDIV+2dQtXbKt1dxK4Lux/GFw=; b=dPv6K1KknBJV9yO6DNrZj3caC6szOnaweX8CSbAVcKC8c5hBOKTBxX2Ly81Qje1kxPF4Ck WM00z1eYoqhHYX6GEsES9FvwIX4HJeW8vK7AXOsQjT+NHq0y/S8WTYMIvDhijq0/iEZQnJ RO9IA15HDxqvimhWKkCpKJGlmlPDTJA= X-MC-Unique: FH__qxQ7MVab9bK87hI3ZQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/17] qemuSnapshotCreate: Use 'snapdef' instead of 'def' Date: Wed, 12 Jan 2022 19:10:13 +0100 Message-Id: <4d4aefcf4134526db3134f2c5dae129fd49b5b8d.1642010887.git.pkrempa@redhat.com> 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 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642011096108100001 Content-Type: text/plain; charset="utf-8" 'def' is commonly used for domain definition. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 797972f4d4..5f256a77df 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1750,7 +1750,7 @@ qemuSnapshotRedefine(virDomainObj *vm, static virDomainSnapshotPtr qemuSnapshotCreate(virDomainObj *vm, virDomainPtr domain, - virDomainSnapshotDef *def, + virDomainSnapshotDef *snapdef, virQEMUDriver *driver, virQEMUDriverConfig *cfg, unsigned int flags) @@ -1760,17 +1760,17 @@ qemuSnapshotCreate(virDomainObj *vm, virDomainMomentObj *current =3D NULL; virDomainSnapshotPtr ret =3D NULL; - if (qemuSnapshotCreateAlignDisks(vm, def, driver, flags) < 0) + if (qemuSnapshotCreateAlignDisks(vm, snapdef, driver, flags) < 0) return NULL; - if (qemuSnapshotPrepare(vm, def, &flags) < 0) + if (qemuSnapshotPrepare(vm, snapdef, &flags) < 0) return NULL; if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA) { snap =3D tmpsnap =3D virDomainMomentObjNew(); - snap->def =3D &def->parent; + snap->def =3D &snapdef->parent; } else { - if (!(snap =3D virDomainSnapshotAssignDef(vm->snapshots, def))) + if (!(snap =3D virDomainSnapshotAssignDef(vm->snapshots, snapdef))) return NULL; if ((current =3D virDomainSnapshotGetCurrent(vm->snapshots))) { @@ -1778,7 +1778,7 @@ qemuSnapshotCreate(virDomainObj *vm, } } - virObjectRef(def); + virObjectRef(snapdef); /* actually do the snapshot */ if (virDomainObjIsActive(vm)) { --=20 2.31.1