From nobody Sun Feb 8 23:32:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573661158; cv=none; d=zoho.com; s=zohoarc; b=hEhJhTe7T/eMgzisqnPMRU4SnyUgTBkESaiRuGHaZctK7vj1an7ktOPbTTKPyUCB3BRrV++SclOId/uTgReDQVLh3dnzMHHc9m8LpTttzErVJtaTuGArk36X3w/iEgwOjRUxHSwiE9duU7Hz21N0o+z7BeTzK2275dwNTvzkJNE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573661158; 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=zD3xKy8IxVQKjXbab2hB2WRe6WA9q+w4mIVN+Dehh6M=; b=DYv/EndM6zEcB3LUx0M7Cnk4bUIQMv4SG5UXpXo+H8tI2fa1jQR24cJzmUWgmyWCCz/Lkwmws7p2BhFjqt6G5d9Np9JRVstaN46JLi3TDRbvEOZfZWRIUfG0vLm9klV0ZHc52M8c5JlNmxxOReCnH+Da4g118NO2TEILSExjJTU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573661158890421.8147626225616; Wed, 13 Nov 2019 08:05:58 -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-318-YNvGP71tM32xO6MOyGQvEQ-1; Wed, 13 Nov 2019 11:05:53 -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 3B2101022621; Wed, 13 Nov 2019 16:05:44 +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 0FAEC1BC76; Wed, 13 Nov 2019 16:05:44 +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 B0FCC4E56C; Wed, 13 Nov 2019 16:05:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xADG5YYb019865 for ; Wed, 13 Nov 2019 11:05:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id E9FF963643; Wed, 13 Nov 2019 16:05:34 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7473D6293B for ; Wed, 13 Nov 2019 16:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573661157; 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=zD3xKy8IxVQKjXbab2hB2WRe6WA9q+w4mIVN+Dehh6M=; b=jLNHWjnzS3xoiaGukmjfGaKGgElnm5LlPC+YjgWXkeDabADdNshR77T67IhH+2qqb0IxlQ +Hk72CMjaPFLY0qfsvDw1O1WooYRkOauQhn4wVQVojfmhACgE/A5SMmwCum1lSmJblX6lu SVPhFnZbMhUUIPnaqXvrkxlLtPEDnFg= From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 13 Nov 2019 17:05:21 +0100 Message-Id: <2dc4ae33c4de3da25f91862c92c1bebbeae92737.1573661034.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/8] conf: domaincaps: Use virXMLFormatElement in virDomainCapsFormatFeatures 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 X-MC-Unique: YNvGP71tM32xO6MOyGQvEQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_capabilities.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 2c1c5fc9e8..d9a9093f89 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -604,16 +604,14 @@ static void virDomainCapsFormatFeatures(const virDomainCaps *caps, virBufferPtr buf) { - virBufferAddLit(buf, "\n"); - virBufferAdjustIndent(buf, 2); + g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); - virDomainCapsFeatureGICFormat(buf, &caps->gic); - qemuDomainCapsFeatureFormatSimple(buf, "vmcoreinfo", caps->vmcoreinfo); - qemuDomainCapsFeatureFormatSimple(buf, "genid", caps->genid); - virDomainCapsFeatureSEVFormat(buf, caps->sev); + virDomainCapsFeatureGICFormat(&childBuf, &caps->gic); + qemuDomainCapsFeatureFormatSimple(&childBuf, "vmcoreinfo", caps->vmcor= einfo); + qemuDomainCapsFeatureFormatSimple(&childBuf, "genid", caps->genid); + virDomainCapsFeatureSEVFormat(&childBuf, caps->sev); - virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "\n"); + virXMLFormatElement(buf, "features", NULL, &childBuf); } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list