From nobody Mon Feb 9 04:46:01 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=1666621084; cv=none; d=zohomail.com; s=zohoarc; b=XuFipgiKKCMrWm1OYOvIoJML07nfo+pzHKq3oMVtbeDC8f4H7YHFarnXtuYWrDlqoiFdPftM1kG4JGoxTyrSro7XEDslx9sjgUS9dHJVSwv/YDoVcYalG98H84kcuiQBi7E+/uJSQ/2ZlbN0uiGQWLqvKopn79qxRFVAYwz+FO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666621084; 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=eojYjVGE/mEtgn/OGikvLeNqJJM1be2gb4Xb5NKfyDc=; b=P7CbBkjg/mHUm4RaQHmLXx2J0NE6GlEvp19pP+Z2VgT7z4dOhjKKyBf8bTq9WO5PncfMzd4v5oU1DZzaLXOk9361asTurZdg9Duw1d+hrSWgphAFJMt3tq1DFK3Dp8+SEZoYOZAmI7H+jX4/Xm2kVUr03de/D/Hd8zA2wAbGMNE= 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 1666621084566133.22255635078068; Mon, 24 Oct 2022 07:18:04 -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-584-kotf9DzXMgWnSdPOgLEJbA-1; Mon, 24 Oct 2022 10:16:42 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DDBF2823F77; Mon, 24 Oct 2022 14:15:54 +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 C89F6C15BB2; Mon, 24 Oct 2022 14:15:54 +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 BACCE194658F; Mon, 24 Oct 2022 14:15:54 +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 5D709194658F for ; Mon, 24 Oct 2022 14:15:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4218440C2064; Mon, 24 Oct 2022 14:15:52 +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 AA9BF40C83AD for ; Mon, 24 Oct 2022 14:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666621083; 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=eojYjVGE/mEtgn/OGikvLeNqJJM1be2gb4Xb5NKfyDc=; b=DIyxGmCPoD0Z9WuA0vT821LybIQX+1ciPkRd2/Aq9YerSSijhPnAEqrfteTMZrHmD3Xq25 OKrGWu5oqDqMaIK6I/fk1wq4Vvs6DKsPlYcesE0TJeGvmaSFm0nM2w0Gmd6m9bCUjie1p1 CwEH0njv6Bq8Bs4bLPppm2AU7TEQ0YE= X-MC-Unique: kotf9DzXMgWnSdPOgLEJbA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 38/43] virDomainSEVDefParseXML: Use virXPathUIntBase instead of virXPathULongHex Date: Mon, 24 Oct 2022 16:14:43 +0200 Message-Id: <53d7a7f64c8f768ebdabe1a50db66163e56733fe.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.8 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: 1666621085330100001 Content-Type: text/plain; charset="utf-8" Use the proper function for an unsigned int. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7c6caa01e5..8b1a28c0d3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13178,14 +13178,13 @@ static int virDomainSEVDefParseXML(virDomainSEVDef *def, xmlXPathContextPtr ctxt) { - unsigned long policy; int rc; if (virXMLPropTristateBool(ctxt->node, "kernelHashes", VIR_XML_PROP_NO= NE, &def->kernel_hashes) < 0) return -1; - if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) { + if (virXPathUIntBase("string(./policy)", ctxt, 16, &def->policy) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("failed to get launch security policy")); return -1; @@ -13214,7 +13213,6 @@ virDomainSEVDefParseXML(virDomainSEVDef *def, return -1; } - def->policy =3D policy; def->dh_cert =3D virXPathString("string(./dhCert)", ctxt); def->session =3D virXPathString("string(./session)", ctxt); --=20 2.37.3