From nobody Mon Feb 9 17:34:51 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=1656000975; cv=none; d=zohomail.com; s=zohoarc; b=DQmy7D5X0u7jEN5ZpDwvLcaA5aYv2EMirC4G+FalDIy37xvPlG0NTKMGxWOaH/RVHgDJgQuic0kjKs2pRWBuCD4HSm7OoIb0sejJDYXVcze2WspVKBZ2ZvwkqJPlczBO3Q0wTar3CHkxdPy0VpwwEQFXKwBGtsxQb1PoCBdIGBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656000975; 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=lpviP0z5vOCFYNFKPoVHckSq8UOlQ0p6+OVmO1T2bFY=; b=KtU+YtDgLk4KSy/rsUDd3r0dmt1DPKNEKMgFgAgAW8UEsFfKJdEdAo1NGJf53BK6Kk0Iuimx0NLwwvFQz69mkk4/Dtl5Ty3Ai+kItl5PC9lPqENzDw7GKl+bZP1KeYMXJuJ3iDP7WIa2QDQ/TbcQ8YXT61WrJ4kBOQPHzYovncQ= 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 1656000975298657.4708746615272; Thu, 23 Jun 2022 09:16:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-371-ECcodB4tN6u_InS5Dde7Yg-1; Thu, 23 Jun 2022 12:15:24 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F6F41C144AE; Thu, 23 Jun 2022 16:14: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 3D7791121315; Thu, 23 Jun 2022 16:14: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 2E372194B95A; Thu, 23 Jun 2022 16:14:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0AFEE194B950 for ; Thu, 23 Jun 2022 16:14:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E19FB1121315; Thu, 23 Jun 2022 16:14:49 +0000 (UTC) Received: from harajuku.homenet.telecomitalia.it (unknown [10.40.194.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E4941121314 for ; Thu, 23 Jun 2022 16:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656000974; 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=lpviP0z5vOCFYNFKPoVHckSq8UOlQ0p6+OVmO1T2bFY=; b=MhEc0fj54VXn8h/xuMOQKEE/qHvl/fRRJICIc5kx/aA6Go3y2Dt/lqNx6xAJ4v8fLWjkFC LwXdQoju1ZwvTeKMDa1LyFdY6kfiQvSMBGsw3qp3od2YSCjR6pJetDmwBIqONZ+J7Z0o9T 22lpIeFhG5gZ67DCyV2+d4MCE+vyno8= X-MC-Unique: ECcodB4tN6u_InS5Dde7Yg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 09/28] conf: Move virDomainLoaderDefParseXML() Date: Thu, 23 Jun 2022 18:14:21 +0200 Message-Id: <20220623161440.61653-10-abologna@redhat.com> In-Reply-To: <20220623161440.61653-1-abologna@redhat.com> References: <20220623161440.61653-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1656000975973100001 Content-Type: text/plain; charset="utf-8" Pure code movement, needed to prepare for upcoming changes. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 57 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 709ca53790..6f5f370696 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17991,34 +17991,6 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomai= nDef *def) return 0; } =20 -static int -virDomainLoaderDefParseXML(xmlNodePtr node, - virDomainLoaderDef *loader, - bool fwAutoSelect) -{ - if (!fwAutoSelect) { - if (virXMLPropTristateBool(node, "readonly", VIR_XML_PROP_NONE, - &loader->readonly) < 0) - return -1; - - if (virXMLPropEnum(node, "type", virDomainLoaderTypeFromString, - VIR_XML_PROP_NONZERO, &loader->type) < 0) - return -1; - - if (!(loader->path =3D virXMLNodeContentString(node))) - return -1; - - if (STREQ(loader->path, "")) - VIR_FREE(loader->path); - } - - if (virXMLPropTristateBool(node, "secure", VIR_XML_PROP_NONE, - &loader->secure) < 0) - return -1; - - return 0; -} - =20 static int virDomainNvramDefParseXML(virDomainLoaderDef *loader, @@ -18065,6 +18037,35 @@ virDomainNvramDefParseXML(virDomainLoaderDef *load= er, } =20 =20 +static int +virDomainLoaderDefParseXML(xmlNodePtr node, + virDomainLoaderDef *loader, + bool fwAutoSelect) +{ + if (!fwAutoSelect) { + if (virXMLPropTristateBool(node, "readonly", VIR_XML_PROP_NONE, + &loader->readonly) < 0) + return -1; + + if (virXMLPropEnum(node, "type", virDomainLoaderTypeFromString, + VIR_XML_PROP_NONZERO, &loader->type) < 0) + return -1; + + if (!(loader->path =3D virXMLNodeContentString(node))) + return -1; + + if (STREQ(loader->path, "")) + VIR_FREE(loader->path); + } + + if (virXMLPropTristateBool(node, "secure", VIR_XML_PROP_NONE, + &loader->secure) < 0) + return -1; + + return 0; +} + + static int virDomainSchedulerParseCommonAttrs(xmlNodePtr node, virProcessSchedPolicy *policy, --=20 2.35.3