From nobody Mon Feb 9 18:18:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1666620963; cv=none; d=zohomail.com; s=zohoarc; b=aLMKlIkakcm6jo0NFFY4BfX4nDvuPy7aurix4va/Ysl7gGV6Y/jYAm3FtFOELOPhywEJkwJ6E7vlO5Vwfp+TvQ8ZaOvy0v7/IcITFmWLBNLyfVRkoi2DMmVlkqwLOenTAeGFEc2nim7myiAHZdBzo5oDdTMnK3Ov6hiA0l2wtLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620963; 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=NUjpVUw6hvQamTB5kHP58n4aDXhDXJz/1QCwxZwykRg=; b=QR47AaK5qWqQZFiJKdvZ3i1ac5N/KrmjblMRrcdfkOPfvSveAbp1p9TwtEJ9o5ac/XIMQEAumGZaF/30XoO0ygTdnAYMFzE3kHLutTZGkIATpaEFHqRurYBzucMRubks5CDFyGKF+EG9rE9SealFiqHDPvWsBpxcdpPino3noj4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1666620963218507.6573898533243; Mon, 24 Oct 2022 07:16:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-H7_XIhcUNmep9MR7CTwMdg-1; Mon, 24 Oct 2022 10:15:41 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F09385CE0F; Mon, 24 Oct 2022 14:15:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF9141401C26; Mon, 24 Oct 2022 14:15:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D63C6194658F; Mon, 24 Oct 2022 14:15:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0CE06194658D for ; Mon, 24 Oct 2022 14:15:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E783F40C2140; Mon, 24 Oct 2022 14:15:15 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57A8440C2064 for ; Mon, 24 Oct 2022 14:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666620961; 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=NUjpVUw6hvQamTB5kHP58n4aDXhDXJz/1QCwxZwykRg=; b=M2XDMIXEmc8A9TyAL4qnhp/JelXLHZQDSC+nNZNUssdaSvFGhzLZm3Is+32X6+rJdMvl70 zd2TbIm/rIG5QrMHfgKlUiRbdij/tQcWWplcYXxBj5oLQ6ePUAA8z2iqKpkvK9g5w0mUeV /c+/Rwv7H0mBJowoCk3XK67Owr+aigg= X-MC-Unique: H7_XIhcUNmep9MR7CTwMdg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 15/43] conf: node_device: Use 'string()' in XPath expressions for virNodeDevCapsDefParseIntOptional Date: Mon, 24 Oct 2022 16:14:20 +0200 Message-Id: <415b28b877aa6edc8e4182445905f28106e8c09f.1666619795.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1666620964373100001 Content-Type: text/plain; charset="utf-8" Upcoming patches will require that the XML XPath query returns a string for conversion in virXPathInt. Convert all the XPaths used with virNodeDevCapsDefParseIntOptional which uses virXPathInt internally. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/node_device_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1e798651c5..9d04c5fdf4 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1623,7 +1623,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt, } /* Optional unique_id value */ scsi_host->unique_id =3D -1; - if (virNodeDevCapsDefParseIntOptional("number(./unique_id[1])", ct= xt, + if (virNodeDevCapsDefParseIntOptional("string(./unique_id[1])", ct= xt, &scsi_host->unique_id, def, _("invalid unique_id supplie= d for '%s'")) < 0) { return -1; @@ -2140,7 +2140,7 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt, /* The default value is -1 since zero is valid NUMA node number */ pci_dev->numa_node =3D -1; - if (virNodeDevCapsDefParseIntOptional("number(./numa[1]/@node)", ctxt, + if (virNodeDevCapsDefParseIntOptional("string(./numa[1]/@node)", ctxt, &pci_dev->numa_node, def, _("invalid NUMA node ID supplied= for '%s'")) < 0) goto out; --=20 2.37.3