From nobody Fri May 17 10:13:39 2024 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=1672765145; cv=none; d=zohomail.com; s=zohoarc; b=kMnPLEjsjm0+nOgyLRgCytMjeRfK5Hqral3Kxn6uq28UTO2BhXujOhE08gDhLdpHP77tidtsC4zFBaF+/JK/n4gV5S2uooj9igEk9pBjS3GlsjFsq0apXA7QB/kz4menwjtHvvMtOrcQOQQeHaiGFUEKwwU+GPiw/cBxJirM7Vo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672765145; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NnkbpaAm/cksQMObIkYoKPRsHd2BnW04jDuOnDDKg7Q=; b=A2Iv8utTbpKL+Ab7kno49geWxrvPO9bfPwRjByDkKe4JpcC3MnV4dlXorP6spECzieRGXTUky75ZHguuyzmYrl134IcdWnBKJiHH2A16j+HtvdAdNDcyRLMNoMsWW4lE+xfWdXxvsP0K18iSXSzRrCdF7YnW/zvoqr5KMLMYY1E= 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 1672765145704958.0413308569846; Tue, 3 Jan 2023 08:59:05 -0800 (PST) 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-643-uu8LCywqPv-Buk9RwLeZdQ-1; Tue, 03 Jan 2023 11:58:52 -0500 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 48F8C18E52C5; Tue, 3 Jan 2023 16:58:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB587140EBF4; Tue, 3 Jan 2023 16:58:48 +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 8DE871946588; Tue, 3 Jan 2023 16:58:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 52DFE1946587 for ; Tue, 3 Jan 2023 16:58:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3461EC15BAD; Tue, 3 Jan 2023 16:58:47 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0D92C15BA0 for ; Tue, 3 Jan 2023 16:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672765144; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NnkbpaAm/cksQMObIkYoKPRsHd2BnW04jDuOnDDKg7Q=; b=ZnOmO2GhujThiAnW59cvihZKYORhLEZf3xc0uNJNDjQeB2pllI3rqnsHkyzZjyxzO+h1gl Q/jp8wyDOGybshVU8y2bchsENErGePowTLjGd7I+rkMJIj6oW776SuVRgMhn7b0RY0XQDO K3BTnKpEHX7PJRwsrThy5L4wA1CUyGY= X-MC-Unique: uu8LCywqPv-Buk9RwLeZdQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] virQEMUCapsLoadCache: Parse properly Date: Tue, 3 Jan 2023 17:58:45 +0100 Message-Id: <0b9fae8f797eb0b8f791f48c274892b28272487c.1672765125.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1672765146600100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In a recent commit, when ditching virXPathULong() the parsing of was changed. But it was changed to virXMLPropUInt() which is not correct because the value we're interested in is not in an attribute but element itself. Fixes: a3c7426839df25f4026707c5877be75f2461f5e9 Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e6024a2d75..0c16366f21 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4533,8 +4533,8 @@ virQEMUCapsLoadCache(virArch hostArch, } qemuCaps->libvirtCtime =3D (time_t)l; =20 - if (virXMLPropUInt(ctxt->node, "selfvers", 10, VIR_XML_PROP_NONE, - &qemuCaps->libvirtVersion) < 0) + if (virXPathUInt("string(./selfvers)", ctxt, + &qemuCaps->libvirtVersion) < 0) return -1; =20 if (!skipInvalidation && --=20 2.38.2