From nobody Mon Feb 9 16:54:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1606911326; cv=none; d=zohomail.com; s=zohoarc; b=Cqla6vu4w6F6K7MNMFh/1iscMTJEYvhORfaG71MpVnj2YIsI4WckgTiEn7rw0p/GZ4td17CyNscT6AeCvHphCvz99aQ0Bw8dALgkXmL9bbykdxoTrZ0Nqu6xmvw5APX9NV5phK/yzLefeqM9Md8pm3o7WyImqDywnERtKbegjo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606911326; 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=/lmv++MdCc7H2pHUOtYpfGKUzz0tjLcwbGlKnDrzSLw=; b=aL1UCBHmyJbzUj1TUhukRDvZFGa5XaRjS4Q+t0Tv7DZsYfCy/pr9g4rbtQf+M7OMieyhIUmRd3o6ydV61y8BdYE22AFiZbe4PYSEzg+XMo//z0gybajqPPinbEvFHQRA2XYYGpUWxi8ntlwHzvuXKt3O07KA0HQTRyTXqBuDU3o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1606911326361422.9942654513676; Wed, 2 Dec 2020 04:15:26 -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-436-QpGAvZhlOwSlYGBTXfR8jg-1; Wed, 02 Dec 2020 07:15:23 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE64C805BEB; Wed, 2 Dec 2020 12:15:17 +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 C607219D9C; Wed, 2 Dec 2020 12:15:17 +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 88E895002E; Wed, 2 Dec 2020 12:15:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B2CFG7k031811 for ; Wed, 2 Dec 2020 07:15:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 16C72189A5; Wed, 2 Dec 2020 12:15:16 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60A0F18A9D for ; Wed, 2 Dec 2020 12:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606911325; 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=/lmv++MdCc7H2pHUOtYpfGKUzz0tjLcwbGlKnDrzSLw=; b=MrillhFQ1i8GhbMI6GqI78OqvoKYRL7Ue619qyrxMhCoLjyasa+GxhRceTcONIHIl87NLx qQevpTDAFAZ4W78QLyVvyDLZe7wbJFPEyOftyeIoT1TfRLsvw9iYMblNv2BdMKrlWActV3 NUfwkmtGf3FfCjhpzhR3khFXI/D+v4k= X-MC-Unique: QpGAvZhlOwSlYGBTXfR8jg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/11] virDomainCheckpointAlignDisks: rename 'def' to 'chkdef' Date: Wed, 2 Dec 2020 13:14:54 +0100 Message-Id: <520b67b9da25102f5b0c772c3a04e94692e42a20.1606911231.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" In most cases 'def' is used for the domain definition. Rename it to chkdef to prevent confusion. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 2375c78b92..1881c93e09 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -290,9 +290,9 @@ virDomainCheckpointCompareDiskIndex(const void *a, cons= t void *b) * if any def->disks[n]->name appears more than once or does not map * to dom->disks. */ int -virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr def) +virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr chkdef) { - virDomainDefPtr domdef =3D def->parent.dom; + virDomainDefPtr domdef =3D chkdef->parent.dom; g_autoptr(virBitmap) map =3D NULL; size_t i; int ndisks; @@ -304,7 +304,7 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr= def) return -1; } - if (def->ndisks > domdef->ndisks) { + if (chkdef->ndisks > domdef->ndisks) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("too many disk checkpoint requests for domain")); return -1; @@ -319,14 +319,14 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDefP= tr def) /* If omitted, do bitmap on all writeable disks; * otherwise, do nothing for omitted disks */ - if (!def->ndisks) + if (!chkdef->ndisks) checkpoint_default =3D VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP; map =3D virBitmapNew(domdef->ndisks); /* Double check requested disks. */ - for (i =3D 0; i < def->ndisks; i++) { - virDomainCheckpointDiskDefPtr disk =3D &def->disks[i]; + for (i =3D 0; i < chkdef->ndisks; i++) { + virDomainCheckpointDiskDefPtr disk =3D &chkdef->disks[i]; int idx =3D virDomainDiskIndexByName(domdef, disk->name, false); if (idx < 0) { @@ -359,9 +359,9 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr= def) } /* Provide defaults for all remaining disks. */ - ndisks =3D def->ndisks; - if (VIR_EXPAND_N(def->disks, def->ndisks, - domdef->ndisks - def->ndisks) < 0) + ndisks =3D chkdef->ndisks; + if (VIR_EXPAND_N(chkdef->disks, chkdef->ndisks, + domdef->ndisks - chkdef->ndisks) < 0) return -1; for (i =3D 0; i < domdef->ndisks; i++) { @@ -369,7 +369,7 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr= def) if (virBitmapIsBitSet(map, i)) continue; - disk =3D &def->disks[ndisks++]; + disk =3D &chkdef->disks[ndisks++]; disk->name =3D g_strdup(domdef->disks[i]->dst); disk->idx =3D i; @@ -381,11 +381,11 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDefP= tr def) disk->type =3D checkpoint_default; } - qsort(&def->disks[0], def->ndisks, sizeof(def->disks[0]), + qsort(&chkdef->disks[0], chkdef->ndisks, sizeof(chkdef->disks[0]), virDomainCheckpointCompareDiskIndex); /* Generate default bitmap names for checkpoint */ - if (virDomainCheckpointDefAssignBitmapNames(def) < 0) + if (virDomainCheckpointDefAssignBitmapNames(chkdef) < 0) return -1; return 0; --=20 2.28.0