From nobody Fri Nov 21 10:10:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762764099; cv=none; d=zohomail.com; s=zohoarc; b=euIInz3jMD8fqCxpvQ6QGtPFVNbqgCKlEICyaCiBUPlJ48WtD7qrcADEXBSetjiZgKFECmDpPzUhz8usYnCQFXFjR7VMJz/ycDhKS3aljCY+0X5yfE0b1sUBBoCf9psaO3YJbH7t3l0/NE5GkVLYK2timFs+tcGwn2Kxxw/o3A4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762764099; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=b6fVjdbW4v7M7KgJgw1qt7eBOv6bwkCy86WMi/RkCYc=; b=YqQywjRhdA/1eBLdtABy8FlzhgUxNisL57jDywp0t73OViSrVmcPT6vnrVYvTWTLT2TMyEIKfj7ABUbDnUFgKfdO6+40lkA11OXubhIy3V7xzn+iH+gQQN8U2gIHHRzHeW52XEz+MNUHLL/YZG1uPyLpbL0zTRo/up1rYEG4V8o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762764099829531.2076535255002; Mon, 10 Nov 2025 00:41:39 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id ECFD4441EE; Mon, 10 Nov 2025 03:41:38 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 57C3344289; Mon, 10 Nov 2025 03:40:14 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id EF33344219; Mon, 10 Nov 2025 03:39:57 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5606444216 for ; Mon, 10 Nov 2025 03:39:57 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-145-8JMcPXpbPPyJYbUGgn-CVw-1; Mon, 10 Nov 2025 03:39:55 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 79C8C1800359 for ; Mon, 10 Nov 2025 08:39:54 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C5A491800361 for ; Mon, 10 Nov 2025 08:39:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762763997; h=from:from: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; bh=b6fVjdbW4v7M7KgJgw1qt7eBOv6bwkCy86WMi/RkCYc=; b=Bq5w2WtwuYfnUOTYbbv7oG/A/8dooyHzJm/F/LzA6SxEUv7OlexoMbTA3R4HWzkCxIu4pE senlibcuIJg1XqSWqdO1eMUwqFqj7ce9na5LU5OVweyzWvu+EPasUyWgZ7p9cP3Ym1vOLT vdvGYjb+lfGagV6bwLz02PddaH3pnJE= X-MC-Unique: 8JMcPXpbPPyJYbUGgn-CVw-1 X-Mimecast-MFC-AGG-ID: 8JMcPXpbPPyJYbUGgn-CVw_1762763994 To: devel@lists.libvirt.org Subject: [PATCH 1/5] domain_capabilities: Move indentation adjustment out of virDomainCapsCPUCustomFormat() Date: Mon, 10 Nov 2025 09:39:46 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wbXWChDh9MXxiiu8qLHGzB1h1No4v36a2RHvFmpP5Nk_1762763994 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: T66BIKCFYUQOWUKTFFKYZUOAOGL4NZPB X-Message-ID-Hash: T66BIKCFYUQOWUKTFFKYZUOAOGL4NZPB X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762764100131158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The aim of virDomainCapsCPUCustomFormat() is to format CPU models into given buffer. But it starts by adjusting indentation. Move this one level up into the caller so that another buffer can be used. This also makes the pattern match in the caller (virDomainCapsCPUFormat()) with the rest of CPU related domcaps formatting. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/domain_capabilities.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 422b68c085..5a94edf9bc 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -446,8 +446,6 @@ virDomainCapsCPUCustomFormat(virBuffer *buf, { size_t i; =20 - virBufferAdjustIndent(buf, 2); - for (i =3D 0; i < custom->nmodels; i++) { virDomainCapsCPUModel *model =3D custom->models + i; =20 @@ -480,8 +478,6 @@ virDomainCapsCPUCustomFormat(virBuffer *buf, virBufferAddLit(buf, "\n"); } } - - virBufferAdjustIndent(buf, -2); } =20 static void @@ -539,7 +535,9 @@ virDomainCapsCPUFormat(virBuffer *buf, virCPUModeTypeToString(VIR_CPU_MODE_CUSTOM)); if (cpu->custom && cpu->custom->nmodels) { virBufferAddLit(buf, "supported=3D'yes'>\n"); + virBufferAdjustIndent(buf, 2); virDomainCapsCPUCustomFormat(buf, cpu->custom); + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); } else { virBufferAddLit(buf, "supported=3D'no'/>\n"); --=20 2.51.0