From nobody Sun Feb 8 15:37:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1616070510; cv=none; d=zohomail.com; s=zohoarc; b=VETDjiX68eZ3M6UdP/4+fTmnEbrN97GphfPHDJZ0guHAA6ESXQyEhfXLB8wYzy1bUrkh96sfXq+sjv6M4DErbLSsrKMDRIbgDZEXbMi/Hy3Swlg4hncZoXoMiXJzK2TR4KmIM/svRJ2CKxlLui02Plfumqjc7AirEm8GpUW2Bqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616070510; 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=HCAuaQY3Re5F+XkslsEuTWb5SoaacE2lVfT56D0AQDU=; b=UtccVpR82rvYiH2IZBTP/zi2peuMZ3nB4U4D1pLj/iQfIoqhHry+husso8Z0u5NyPtB1F4ARaTlKmzf4KxXzV8pjl1/A6yScV8242wFEyCidod2ehZhx2eYmqBcdlabNgWu90M/5SFa0YnIYa/pvObajKKVHYrnS+axwTEwzHjc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1616070510777501.87659265585603; Thu, 18 Mar 2021 05:28:30 -0700 (PDT) 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-237-n4n66PVAPE6sbM4VhvsdgA-1; Thu, 18 Mar 2021 08:28:26 -0400 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 1F28B107ACCA; Thu, 18 Mar 2021 12:28:20 +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 C81855D6A8; Thu, 18 Mar 2021 12:28:19 +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 6352A4A7C8; Thu, 18 Mar 2021 12:28:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12ICQr2q024664 for ; Thu, 18 Mar 2021 08:26:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id D2D1E5C582; Thu, 18 Mar 2021 12:26:53 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 528D35C239 for ; Thu, 18 Mar 2021 12:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616070509; 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=HCAuaQY3Re5F+XkslsEuTWb5SoaacE2lVfT56D0AQDU=; b=QqHd89CotsGyjIwEXPrickI63SArlDr/dMnSYnTBz0xH1JtAU8Bk/sl1sEE2LUlw48nrmM QVK1eEH9kOOO/DTxyR3UY5C6Q54gLA/tCTVFb0UvJeWVJd+3Ldo99jtgRKofj+b0ppCuhC mKSqyLuCJPGgyZY+LNIk75vHt9vgYyE= X-MC-Unique: n4n66PVAPE6sbM4VhvsdgA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 3/9] conf: introduce virDomainDefParseBootKernelOptions Date: Thu, 18 Mar 2021 13:26:40 +0100 Message-Id: <4d78d3597c02504366f8aea7435516a0905a722b.1616070296.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com 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 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) Content-Type: text/plain; charset="utf-8" Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 31b908d8fe..4876fe61bb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19583,6 +19583,18 @@ virDomainDefParseBootInitOptions(virDomainDefPtr d= ef, } =20 =20 +static void +virDomainDefParseBootKernelOptions(virDomainDefPtr def, + xmlXPathContextPtr ctxt) +{ + def->os.kernel =3D virXPathString("string(./os/kernel[1])", ctxt); + def->os.initrd =3D virXPathString("string(./os/initrd[1])", ctxt); + def->os.cmdline =3D virXPathString("string(./os/cmdline[1])", ctxt); + def->os.dtb =3D virXPathString("string(./os/dtb[1])", ctxt); + def->os.root =3D virXPathString("string(./os/root[1])", ctxt); +} + + static int virDomainDefParseBootOptions(virDomainDefPtr def, xmlXPathContextPtr ctxt) @@ -19612,11 +19624,7 @@ virDomainDefParseBootOptions(virDomainDefPtr def, g_autofree char *firmware =3D NULL; xmlNodePtr loader_node; =20 - def->os.kernel =3D virXPathString("string(./os/kernel[1])", ctxt); - def->os.initrd =3D virXPathString("string(./os/initrd[1])", ctxt); - def->os.cmdline =3D virXPathString("string(./os/cmdline[1])", ctxt= ); - def->os.dtb =3D virXPathString("string(./os/dtb[1])", ctxt); - def->os.root =3D virXPathString("string(./os/root[1])", ctxt); + virDomainDefParseBootKernelOptions(def, ctxt); =20 if (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM && (firmware =3D virXPathString("string(./os/@firmware)", ctxt)))= { --=20 2.30.2