From nobody Tue Feb 10 04:14:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599191012; cv=none; d=zohomail.com; s=zohoarc; b=Ingj2kcwMDgS/OL1Ky+cf7crJ9aeqNsoF4Om4VrgMZjmnpFhQpU7CgdDXnUgR+dmrA6b1B23b+YoUVJb9olvMwbR+d4+jb3DNJdnKw9Mj5bDi7F8DFCrmkvz3cH9G7G9FoxUXIwlZL/tCLP0pnW4nlLafV8tpm9ULSkhrGkzTOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599191012; 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=lvWav4VEbVYD0/5awM3KyFna0v70k7Z5GLvmwcZX3VI=; b=RSAs09wkExsMq/79dEwLlghU7uEfabEELcn1afSNG8PzgXvLhE1DNk7dNfXrpT7zLSFXPQ7cVx1R0/sYBxW2SWTV1wHq6lyLoFFENU7wQ3DIenJYIFwc4HfZuDsQ0Lrfq4KIEtG0ZADtxwd2A78jyz1Y9mUdTYJtCg/E0POmiVM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599191012973150.11243818487446; Thu, 3 Sep 2020 20:43:32 -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-335-KulaHmyROMid3Zpu7tR9mA-1; Thu, 03 Sep 2020 23:43:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D81DF18B9EB7; Fri, 4 Sep 2020 03:43:24 +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 B51981A4D6; Fri, 4 Sep 2020 03:43:24 +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 82991972F8; Fri, 4 Sep 2020 03:43:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0843fMK5030885 for ; Thu, 3 Sep 2020 23:41:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id D30E9117DB03; Fri, 4 Sep 2020 03:41:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC19A117DB01 for ; Fri, 4 Sep 2020 03:41:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B42388F6E68 for ; Fri, 4 Sep 2020 03:41:22 +0000 (UTC) Received: from mail-m24147.qiye.163.com (mail-m24147.qiye.163.com [220.194.24.147]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-19-fBgFF1BzMGukAJQfqwWUUg-1; Thu, 03 Sep 2020 23:41:19 -0400 Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp4 (Coremail) with SMTP id JedpCgAHcNgStlFfYHYgCg--.1426S41; Fri, 04 Sep 2020 11:35:57 +0800 (CST) X-MC-Unique: KulaHmyROMid3Zpu7tR9mA-1 X-MC-Unique: fBgFF1BzMGukAJQfqwWUUg-1 From: Shi Lei To: libvir-list@redhat.com Subject: [RFCv2 39/46] conf: Replace virDomainGraphicsDefParseXMLEGLHeadless(hardcoded) with virDomainGraphicsEGLHeadlessDefParseXML(generated) Date: Fri, 4 Sep 2020 11:35:31 +0800 Message-Id: <20200904033538.418579-40-shi_lei@massclouds.com> In-Reply-To: <20200904033538.418579-1-shi_lei@massclouds.com> References: <20200904033538.418579-1-shi_lei@massclouds.com> MIME-Version: 1.0 X-CM-TRANSID: JedpCgAHcNgStlFfYHYgCg--.1426S41 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRuksgUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiDwWVT1nfQQWGqwAAs- X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 19 +------------------ src/conf/domain_conf.h | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 88e324e..f3b59ed 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14463,23 +14463,6 @@ virDomainGraphicsSpiceDefParseXMLHook(xmlNodePtr n= ode G_GNUC_UNUSED, } =20 =20 -static int -virDomainGraphicsDefParseXMLEGLHeadless(virDomainGraphicsDefPtr def, - xmlNodePtr node, - xmlXPathContextPtr ctxt) -{ - VIR_XPATH_NODE_AUTORESTORE(ctxt) - xmlNodePtr glNode; - - ctxt->node =3D node; - - if ((glNode =3D virXPathNode("./gl", ctxt))) - def->data.egl_headless.rendernode =3D virXMLPropString(glNode, - "rendernode"); - return 0; -} - - virDomainGraphicsDefPtr virDomainGraphicsDefNew(virDomainXMLOptionPtr xmlopt) { @@ -14572,7 +14555,7 @@ virDomainGraphicsDefParseXML(virDomainXMLOptionPtr = xmlopt, goto error; break; case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: - if (virDomainGraphicsDefParseXMLEGLHeadless(def, node, ctxt) < 0) + if (virDomainGraphicsEGLHeadlessDefParseXML(node, &def->data.egl_h= eadless, NULL, def, NULL) < 0) goto error; break; case VIR_DOMAIN_GRAPHICS_TYPE_LAST: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ad84fe3..baa9166 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1744,8 +1744,8 @@ struct _virDomainGraphicsSpiceDef { /* genparse:c= oncisehook, genformat:separ char *rendernode; /* xmlattr:gl/rendernode */ }; =20 -struct _virDomainGraphicsEGLHeadlessDef { - char *rendernode; +struct _virDomainGraphicsEGLHeadlessDef { /* genparse */ + char *rendernode; /* xmlattr:gl/rendernode */ }; =20 struct _virDomainGraphicsDef { --=20 2.25.1