From nobody Tue Dec 16 02:36:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749040391; cv=none; d=zohomail.com; s=zohoarc; b=Es5B+yQfAJ58B/wz3hE61TyM1LlQ0h8o5QqM9HQadmuGoM2qUtc/sDm1jB3Jx5jmkKWUrHwwGvWqe4kgIsLpdsmN9AFnCMayteDo+UAhx3VrSt40zVznxFYGZ0r7AZVIWt0tJjy3Sx3bPVhqUcnilAA1U90FqoV+GZqzZYgCEbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749040391; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=e6FlyblRjnBD1T1ZlVijwK2zxqYtZyjikcNyjMgWtjk=; b=BdSGH3Dw2PrIuvEW2JICsJ6Vtk9qVpxhjOaz2sRRhthNeXXCQnKZKoa99bQPZ/UjrlTtTJebLfON/FSBelrYGtzYBa8sldiUfnGeIuLfVcdFDeq6WbvIs+izjTaJ5bACbBzlug4eJ6jow7gc4RtPsb3al7EWtbgosyZzIZudUzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1749040391526102.01266833232432; Wed, 4 Jun 2025 05:33:11 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7F899143A; Wed, 4 Jun 2025 08:33:10 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C209E128C; Wed, 4 Jun 2025 08:32:27 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8A0451210; Wed, 4 Jun 2025 08:32:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 127A7CA6 for ; Wed, 4 Jun 2025 08:32:25 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-6fWmeJIGP9CLe5UFLDOK7g-1; Wed, 04 Jun 2025 08:32:23 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45CB718002BF for ; Wed, 4 Jun 2025 12:32:22 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3112919560B1; Wed, 4 Jun 2025 12:32:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749040344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9DCHnCCwgwp5AC0MzJLRuLyvqhI0bpH/SQ0DAbM1TGs=; b=G33FXe+noBTMJ8C4hWaFUqO3ZYpzpqWVb+cXELaX5e0kXWjUPTEOSOPMe/sHG5VL9EUc9j +ZFTJSNmHYu2jZOxsqUq28w84FnmxzkMBZyFFsO4UzEx1pvL4uRuXqm/7ECwu/d948NO4k /E+VAxgf8ENPx7QJfBJPg9JeisHe/xU= X-MC-Unique: 6fWmeJIGP9CLe5UFLDOK7g-1 X-Mimecast-MFC-AGG-ID: 6fWmeJIGP9CLe5UFLDOK7g_1749040342 To: devel@lists.libvirt.org Subject: [PATCH v2 1/4] conf: VNC graphics parse refactor Date: Wed, 4 Jun 2025 14:24:12 +0200 Message-ID: <20250604123215.34281-2-kshcheti@redhat.com> In-Reply-To: <20250604123215.34281-1-kshcheti@redhat.com> References: <20250604123215.34281-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: K4m_dsIF7pCJt3xPvZplVmtnP84Nc8SB2oM4AKs_CAo_1749040342 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6CYIDNAWLHDSRDPQJQNHZOBFZLS4WQPE X-Message-ID-Hash: 6CYIDNAWLHDSRDPQJQNHZOBFZLS4WQPE X-MailFrom: kshcheti@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Kirill Shchetiniuk X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Kirill Shchetiniuk via Devel Reply-To: Kirill Shchetiniuk X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749040393708116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Kirill Shchetiniuk Previously, the VNC graphics definition parsing were implemented by string parsing, the virDomainGraphicsDefParseXMLVNC was refactored to use the appropriate virXMLProp* utility functions. Overall parsing logic was not changed and results the same output as before. Signed-off-by: Kirill Shchetiniuk Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 48 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b3b0bd7329..c16aa279fb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11815,46 +11815,46 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphics= Def *def, xmlXPathContextPtr ctxt, unsigned int flags) { - g_autofree char *port =3D virXMLPropString(node, "port"); - g_autofree char *websocketGenerated =3D virXMLPropString(node, "websoc= ketGenerated"); - g_autofree char *autoport =3D virXMLPropString(node, "autoport"); xmlNodePtr audioNode; + virTristateBool autoport; + virTristateBool websocketGenerated; VIR_XPATH_NODE_AUTORESTORE(ctxt) =20 if (virDomainGraphicsListensParseXML(def, node, ctxt, flags) < 0) return -1; =20 - if (port) { - if (virStrToLong_i(port, NULL, 10, &def->data.vnc.port) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse vnc port %1$s"), port); - return -1; - } + if (virXMLPropInt(node, "port", 10, VIR_XML_PROP_NONE, + &def->data.vnc.port, 0) < 0) + return -1; + + if (def->data.vnc.port =3D=3D -1) { /* Legacy compat syntax, used -1 for auto-port */ - if (def->data.vnc.port =3D=3D -1) { - if (flags & VIR_DOMAIN_DEF_PARSE_INACTIVE) - def->data.vnc.port =3D 0; - def->data.vnc.autoport =3D true; - } - } else { - def->data.vnc.port =3D 0; def->data.vnc.autoport =3D true; } =20 - if (autoport) { - ignore_value(virStringParseYesNo(autoport, &def->data.vnc.autoport= )); - - if (def->data.vnc.autoport && flags & VIR_DOMAIN_DEF_PARSE_INACTIV= E) - def->data.vnc.port =3D 0; + if (def->data.vnc.port =3D=3D 0) { + /* No port specified */ + def->data.vnc.autoport =3D true; } =20 + if (virXMLPropTristateBool(node, "autoport", VIR_XML_PROP_NONE, + &autoport) < 0) + return -1; + + virTristateBoolToBool(autoport, &def->data.vnc.autoport); + + if (def->data.vnc.autoport && (flags & VIR_DOMAIN_DEF_PARSE_INACTIVE)) + def->data.vnc.port =3D 0; + if (virXMLPropInt(node, "websocket", 10, VIR_XML_PROP_NONE, &def->data.vnc.websocket, 0) < 0) return -1; =20 - if (websocketGenerated) - ignore_value(virStringParseYesNo(websocketGenerated, - &def->data.vnc.websocketGenerated)); + if (virXMLPropTristateBool(node, "websocketGenerated", VIR_XML_PROP_NO= NE, + &websocketGenerated) < 0) + return -1; + + virTristateBoolToBool(websocketGenerated, &def->data.vnc.websocketGene= rated); =20 if (virXMLPropEnum(node, "sharePolicy", virDomainGraphicsVNCSharePolicyTypeFromString, --=20 2.49.0 From nobody Tue Dec 16 02:36:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749040420; cv=none; d=zohomail.com; s=zohoarc; b=OV7pKFGyC5zMk7WWzFvpOWYCKvHkKCNzTwKSPmlzv7IRF64RQ2gcYd3n0Kqg98lbztWlMIAYjKs0AyJE9jI8IOGl8UkcMN3brIva19B3DYtAaQNLPmKocu6VXcY6zufhuKqAKh7/b37+R4qLHhOGCC9hOT3GyYdmmnTbfY5L6IY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749040420; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=8618SM1bTze0h7XJErpNU4cA5w0UD/lqlhDMHwM8LHk=; b=AA+jsr+hWc+ke3uQXL8EDKu+sd5EJEivhVlG7XXvxQ282TVJ0+JVtaVNY891OYuKAyIky0eOBJX7nXdXgdrXTGptu/mlB1cDfas0wz9DDRVQQoFf+R6P/08BTqwjXxIU9ysngmgYDOgTtz1bbRPSGCqrXN1EUmxqKcK4HrmZku0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17490404196461000.8065709135333; Wed, 4 Jun 2025 05:33:39 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B33321555; Wed, 4 Jun 2025 08:33:38 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 1F2FB1474; Wed, 4 Jun 2025 08:32:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5347C11F1; Wed, 4 Jun 2025 08:32:26 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D974DCA6 for ; Wed, 4 Jun 2025 08:32:25 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-sv6lvG3iNFmLCeAMvrESZw-1; Wed, 04 Jun 2025 08:32:24 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 78B201956089 for ; Wed, 4 Jun 2025 12:32:23 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 897D519560B2; Wed, 4 Jun 2025 12:32:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749040345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xx3j6I7TUXC2pOn0z+kDRzfnEClav01xSylCH4XYS10=; b=OSzYnET+jUxOfrEkOkxFp1rCKZp2WtL/X6EqZgFJXy2FA+WAAQL53s+xfg++wJ1M4Tx61m xnDAWjuC8Y6jDThJ+w61p3nOQFDtLDCoTNnbZ9NvkxFOPW6y/jVcJZXK9I/UlM5hm5/KpG hgJg9wtPAiml7ony92plIuyvMfzPW2Y= X-MC-Unique: sv6lvG3iNFmLCeAMvrESZw-1 X-Mimecast-MFC-AGG-ID: sv6lvG3iNFmLCeAMvrESZw_1749040343 To: devel@lists.libvirt.org Subject: [PATCH v2 2/4] conf: SDL fullscreen option refactor Date: Wed, 4 Jun 2025 14:24:13 +0200 Message-ID: <20250604123215.34281-3-kshcheti@redhat.com> In-Reply-To: <20250604123215.34281-1-kshcheti@redhat.com> References: <20250604123215.34281-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rTXsO6L0e18swz0wi7ftof72ETlpIIJfa7vMOXOHkvM_1749040343 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HOSGPRHZ3OU435JGCHDXDN73FQFV5HNK X-Message-ID-Hash: HOSGPRHZ3OU435JGCHDXDN73FQFV5HNK X-MailFrom: kshcheti@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Kirill Shchetiniuk X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Kirill Shchetiniuk via Devel Reply-To: Kirill Shchetiniuk X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749040422031116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Kirill Shchetiniuk Previously, the fullscreen option were parsed as a tristate but stored as a bool type, changed the fullscreen option type to tristate bool to avoid unnecessary type convertions. Signed-off-by: Kirill Shchetiniuk Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 9 ++++----- src/conf/domain_conf.h | 2 +- src/qemu/qemu_command.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c16aa279fb..32a358d72c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11891,15 +11891,13 @@ virDomainGraphicsDefParseXMLSDL(virDomainGraphics= Def *def, { VIR_XPATH_NODE_AUTORESTORE(ctxt) xmlNodePtr glNode; - virTristateBool fullscreen; =20 ctxt->node =3D node; =20 if (virXMLPropTristateBool(node, "fullscreen", VIR_XML_PROP_NONE, - &fullscreen) < 0) + &def->data.sdl.fullscreen) < 0) return -1; =20 - virTristateBoolToBool(fullscreen, &def->data.sdl.fullscreen); def->data.sdl.xauth =3D virXMLPropString(node, "xauth"); def->data.sdl.display =3D virXMLPropString(node, "display"); =20 @@ -26956,8 +26954,9 @@ virDomainGraphicsDefFormatSDL(virBuffer *attrBuf, =20 virBufferEscapeString(attrBuf, " xauth=3D'%s'", def->data.sdl.xauth); =20 - if (def->data.sdl.fullscreen) - virBufferAddLit(attrBuf, " fullscreen=3D'yes'"); + if (def->data.sdl.fullscreen !=3D VIR_TRISTATE_BOOL_ABSENT) + virBufferAsprintf(attrBuf, " fullscreen=3D'%s'", + virTristateBoolTypeToString(def->data.sdl.fullsc= reen)); =20 virDomainGraphicsDefFormatGL(childBuf, def->data.sdl.gl, NULL); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 58b97a2b54..8df404dc42 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2036,7 +2036,7 @@ struct _virDomainGraphicsDef { struct { char *display; char *xauth; - bool fullscreen; + virTristateBool fullscreen; virTristateBool gl; } sdl; struct { diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fec48edfc1..895af0ff6d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8108,7 +8108,7 @@ qemuBuildGraphicsSDLCommandLine(virQEMUDriverConfig *= cfg G_GNUC_UNUSED, virCommandAddEnvPair(cmd, "XAUTHORITY", graphics->data.sdl.xauth); if (graphics->data.sdl.display) virCommandAddEnvPair(cmd, "DISPLAY", graphics->data.sdl.display); - if (graphics->data.sdl.fullscreen) + if (graphics->data.sdl.fullscreen =3D=3D VIR_TRISTATE_BOOL_YES) virCommandAddArg(cmd, "-full-screen"); =20 virCommandAddArg(cmd, "-display"); --=20 2.49.0 From nobody Tue Dec 16 02:36:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749040448; cv=none; d=zohomail.com; s=zohoarc; b=mUXFuPwPLRPxDIpMNlXSTVQqdfbZBPXS90WpBqK/IkcAZ4Fr+/AXRMDFfK39djheV2/BxmbUs8FKTZJZeOAwimV4uNCsHWRZpGc+FmDYqaqeXQS0jHh2378uYQsh2AhcunYZof1xwN4NtxLOBV9wUULy8me3VV6u+nEb40U0fJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749040448; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=aMep6ySYvL5BaBZ1EAX9mSFuJBs9JImRdgcuh8C7K3c=; b=fOG1/dxan+AZuA3IPRJyh3PbKyDKA0JgTXjzgZqu1VAT2+Sy47VGk/detbLUMrBXCqNJ5sa5SL7bzGXsYeXyUKbKXO7ldnMFzQ7euA/a9N9FEqW31sOceHMXWa+z9Prnuv7lW8/AsaB9Se/XXgB1y1kdEQCG7uupKN9BQ2eKkE4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1749040448658884.2710951866696; Wed, 4 Jun 2025 05:34:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 996F512D1; Wed, 4 Jun 2025 08:34:07 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3354A121F; Wed, 4 Jun 2025 08:32:38 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4951C14B0; Wed, 4 Jun 2025 08:32:33 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 780B51248 for ; Wed, 4 Jun 2025 08:32:27 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-3JzutEdTPG6MFkd14Oo5JA-1; Wed, 04 Jun 2025 08:32:25 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D27F9180035C for ; Wed, 4 Jun 2025 12:32:24 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E2B9319560AD; Wed, 4 Jun 2025 12:32:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749040347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UObnp/ReCYBTFly+u/GHibYFTBw+dXEDr6BJZ85dpjo=; b=Yuag8E50z+LV42KsxKlew7lxhgvtpHuGu83ohOgW8iFU4JO5QWCk5kC6T5B0Doyl3zL0b4 1NhcQGDHsTmDyWl6nY+nATcRqvYeQbIny80BguRax89+yhbrRtipFp2nqkdMNWeOMF76Ql V57InCOQD+QlrDiXiN1F9P5F3HKVJqw= X-MC-Unique: 3JzutEdTPG6MFkd14Oo5JA-1 X-Mimecast-MFC-AGG-ID: 3JzutEdTPG6MFkd14Oo5JA_1749040344 To: devel@lists.libvirt.org Subject: [PATCH v2 3/4] conf: RDP graphics parse refactor Date: Wed, 4 Jun 2025 14:24:14 +0200 Message-ID: <20250604123215.34281-4-kshcheti@redhat.com> In-Reply-To: <20250604123215.34281-1-kshcheti@redhat.com> References: <20250604123215.34281-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: VO9Pa9-wr0OVRkQCiP34D98lyTflAeg3thqtEe00zec_1749040344 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WUGE4ED2QQBLHOIG3UDOKWHVNHDBE4BH X-Message-ID-Hash: WUGE4ED2QQBLHOIG3UDOKWHVNHDBE4BH X-MailFrom: kshcheti@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Kirill Shchetiniuk X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Kirill Shchetiniuk via Devel Reply-To: Kirill Shchetiniuk X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749040450457116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Kirill Shchetiniuk Previously, the RDP graphics definition parsing were implemented by string parsing, the virDomainGraphicsDefParseXMLRDP function is refactored to use the appropriate virXMLProp* utility functions. Overall parsing logic was not changed and results the same output as before. Moreover, 'replaceUser' and 'mutliUser' params type was changed from bool to tristate type, to avoid unnecessary type convertions. Signed-off-by: Kirill Shchetiniuk Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 51 +++++++++++++++++++++------------------- src/conf/domain_conf.h | 4 ++-- src/qemu/qemu_process.c | 4 ++-- src/qemu/qemu_validate.c | 4 ++-- src/vbox/vbox_common.c | 8 +++---- 5 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 32a358d72c..201a4ded8b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11917,40 +11917,41 @@ virDomainGraphicsDefParseXMLRDP(virDomainGraphics= Def *def, xmlXPathContextPtr ctxt, unsigned int flags) { - g_autofree char *port =3D virXMLPropString(node, "port"); - g_autofree char *autoport =3D virXMLPropString(node, "autoport"); - g_autofree char *replaceUser =3D virXMLPropString(node, "replaceUser"); - g_autofree char *multiUser =3D virXMLPropString(node, "multiUser"); + virTristateBool autoport; =20 if (virDomainGraphicsListensParseXML(def, node, ctxt, flags) < 0) return -1; =20 - if (port) { - if (virStrToLong_i(port, NULL, 10, &def->data.rdp.port) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse rdp port %1$s"), port); - return -1; - } - /* Legacy compat syntax, used -1 for auto-port */ - if (def->data.rdp.port =3D=3D -1) - def->data.rdp.autoport =3D true; + if (virXMLPropInt(node, "port", 10, VIR_XML_PROP_NONE, + &def->data.rdp.port, 0) < 0) + return -1; =20 - } else { - def->data.rdp.port =3D 0; + if (def->data.rdp.port =3D=3D -1) { + /* Legacy compat syntax, used -1 for auto-port */ def->data.rdp.autoport =3D true; } =20 - if (STREQ_NULLABLE(autoport, "yes")) + if (def->data.rdp.port =3D=3D 0) { + /* No port specified */ def->data.rdp.autoport =3D true; + } + + if (virXMLPropTristateBool(node, "autoport", VIR_XML_PROP_NONE, + &autoport) < 0) + return -1; + + virTristateBoolToBool(autoport, &def->data.rdp.autoport); =20 if (def->data.rdp.autoport && (flags & VIR_DOMAIN_DEF_PARSE_INACTIVE)) def->data.rdp.port =3D 0; =20 - if (STREQ_NULLABLE(replaceUser, "yes")) - def->data.rdp.replaceUser =3D true; + if (virXMLPropTristateBool(node, "replaceUser", VIR_XML_PROP_NONE, + &def->data.rdp.replaceUser)) + return -1; =20 - if (STREQ_NULLABLE(multiUser, "yes")) - def->data.rdp.multiUser =3D true; + if (virXMLPropTristateBool(node, "multiUser", VIR_XML_PROP_NONE, + &def->data.rdp.replaceUser)) + return -1; =20 if (virDomainGraphicsAuthDefParseXML(node, &def->data.rdp.auth, def->type) < 0) @@ -26977,11 +26978,13 @@ virDomainGraphicsDefFormatRDP(virBuffer *attrBuf, if (def->data.rdp.autoport) virBufferAddLit(attrBuf, " autoport=3D'yes'"); =20 - if (def->data.rdp.replaceUser) - virBufferAddLit(attrBuf, " replaceUser=3D'yes'"); + if (def->data.rdp.replaceUser !=3D VIR_TRISTATE_BOOL_ABSENT) + virBufferAsprintf(attrBuf, " replaceUser=3D'%s'", + virTristateBoolTypeToString(def->data.rdp.replac= eUser)); =20 - if (def->data.rdp.multiUser) - virBufferAddLit(attrBuf, " multiUser=3D'yes'"); + if (def->data.rdp.multiUser !=3D VIR_TRISTATE_BOOL_ABSENT) + virBufferAsprintf(attrBuf, " multiUser=3D'%s'", + virTristateBoolTypeToString(def->data.rdp.multiU= ser)); =20 virDomainGraphicsListenDefFormatAddr(attrBuf, glisten, flags); =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8df404dc42..c909cfba3f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2043,8 +2043,8 @@ struct _virDomainGraphicsDef { int port; bool portReserved; bool autoport; - bool replaceUser; - bool multiUser; + virTristateBool replaceUser; + virTristateBool multiUser; virDomainGraphicsAuthDef auth; } rdp; struct { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 54b84922d6..02cca5fb6b 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5550,12 +5550,12 @@ qemuProcessStartValidateGraphics(virDomainObj *vm) _("qemu-rdp does not support multiple liste= ns for one graphics device.")); return -1; } - if (graphics->data.rdp.multiUser) { + if (graphics->data.rdp.multiUser =3D=3D VIR_TRISTATE_BOOL_YES)= { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("qemu-rdp doesn't support the 'multiUser'= attribute.")); return -1; } - if (graphics->data.rdp.replaceUser) { + if (graphics->data.rdp.replaceUser =3D=3D VIR_TRISTATE_BOOL_YE= S) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("qemu-rdp doesn't support the 'replaceUse= r' attribute.")); return -1; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index e45f636418..968533ccf3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4512,12 +4512,12 @@ qemuValidateDomainDeviceDefDBusGraphics(const virDo= mainGraphicsDef *graphics, static int qemuValidateDomainDeviceDefRDPGraphics(const virDomainGraphicsDef *graphic= s) { - if (graphics->data.rdp.replaceUser) { + if (graphics->data.rdp.replaceUser =3D=3D VIR_TRISTATE_BOOL_YES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("RDP doesn't support 'replaceUser'")); return -1; } - if (graphics->data.rdp.multiUser) { + if (graphics->data.rdp.multiUser =3D=3D VIR_TRISTATE_BOOL_YES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("RDP doesn't support 'multiUser'")); return -1; diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 349ac832dc..929d452abd 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -1703,13 +1703,13 @@ vboxAttachDisplay(virDomainDef *def, struct _vboxDr= iver *data, IMachine *machine =20 gVBoxAPI.UIVRDEServer.SetPorts(data, VRDEServer, def->grap= hics[i]); =20 - if (def->graphics[i]->data.rdp.replaceUser) { + if (def->graphics[i]->data.rdp.replaceUser =3D=3D VIR_TRIS= TATE_BOOL_YES) { gVBoxAPI.UIVRDEServer.SetReuseSingleConnection(VRDESer= ver, PR_TRUE= ); VIR_DEBUG("VRDP set to reuse single connection"); } =20 - if (def->graphics[i]->data.rdp.multiUser) { + if (def->graphics[i]->data.rdp.multiUser =3D=3D VIR_TRISTA= TE_BOOL_YES) { gVBoxAPI.UIVRDEServer.SetAllowMultiConnection(VRDEServ= er, PR_TRUE); VIR_DEBUG("VRDP set to allow multiple connection"); @@ -3611,11 +3611,11 @@ vboxDumpDisplay(virDomainDef *def, struct _vboxDriv= er *data, IMachine *machine) =20 gVBoxAPI.UIVRDEServer.GetAllowMultiConnection(VRDEServer, &allowMu= ltiConnection); if (allowMultiConnection) - graphics->data.rdp.multiUser =3D true; + graphics->data.rdp.multiUser =3D VIR_TRISTATE_BOOL_YES; =20 gVBoxAPI.UIVRDEServer.GetReuseSingleConnection(VRDEServer, &reuseS= ingleConnection); if (reuseSingleConnection) - graphics->data.rdp.replaceUser =3D true; + graphics->data.rdp.replaceUser =3D VIR_TRISTATE_BOOL_YES; =20 VIR_APPEND_ELEMENT(def->graphics, def->ngraphics, graphics); } --=20 2.49.0 From nobody Tue Dec 16 02:36:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749040472; cv=none; d=zohomail.com; s=zohoarc; b=U4PXwbRmnOLW1mTpN6TBgdYCG2oJLw2iFp+v0t1R88vgJcJ0ZKM4doLyaRxckzZndz3XCQdtvOAeTsM1FMjvpgH2TnaBN1HG2rCsmQWtc/8pbqZ3Rg3+GUCLyPrSpwPYUnIj7LVHe80mFHAKP7GBaKnHkMPqqgb0Wi0yc1vp8ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749040472; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=9kClDq/FsI2+KDgStVNYVntEhEuyH9TP6eIAvc/XsjQ=; b=T5VzV0GKD3GmvFyYei5y46gpLMHlizcQLejsnqlWVAwOLj2yxLPZ/2W+ALa1FNKO03Eo8+0Q3wcRwLLpfSPH62bIAUx0tdD7ASjuSx/nNyJsS0oqaTleoz4vPSO96jDaaAuCkvFQtpuVIuwIXPZsnhDq5omugH6S1LzDgSBJFOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1749040472852275.1835991348763; Wed, 4 Jun 2025 05:34:32 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id CAD0F122B; Wed, 4 Jun 2025 08:34:29 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 49B251492; Wed, 4 Jun 2025 08:32:40 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0AFFE137C; Wed, 4 Jun 2025 08:32:35 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 79772136B for ; Wed, 4 Jun 2025 08:32:28 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-Q-C3cfz8Mlq_q9134VRehw-1; Wed, 04 Jun 2025 08:32:27 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4CEBE1956095 for ; Wed, 4 Jun 2025 12:32:26 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5CB0E19560AD; Wed, 4 Jun 2025 12:32:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749040348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mJw3RzBUcId9iWQPuJ/7XN5bI05aWoUQ518ot8jre40=; b=FSDkoF6N/2g1bjq07VlwR2CqdSFuxw3iHcgH/8PscdyhiTyKMoXlzAnXNlKuQ3+uKhoWyq UOqCie8W+vgew9a6JouYhixA8hb1TLHrFiCovYAp020+EICJ41ZrgXk+QLM7w3d9dPFBmQ apsioT8QayjdUEUIdLRdd2/Z5ZHgJa8= X-MC-Unique: Q-C3cfz8Mlq_q9134VRehw-1 X-Mimecast-MFC-AGG-ID: Q-C3cfz8Mlq_q9134VRehw_1749040346 To: devel@lists.libvirt.org Subject: [PATCH v2 4/4] conf: desktop graphics remove unused option Date: Wed, 4 Jun 2025 14:24:15 +0200 Message-ID: <20250604123215.34281-5-kshcheti@redhat.com> In-Reply-To: <20250604123215.34281-1-kshcheti@redhat.com> References: <20250604123215.34281-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jgCi8kEhhsRO1sAwp6UZ07ubQdkp0Pa_6SckrO_a6z8_1749040346 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VDKW7EWGTSPJWDLGKTMHZWVBKL6TLOZH X-Message-ID-Hash: VDKW7EWGTSPJWDLGKTMHZWVBKL6TLOZH X-MailFrom: kshcheti@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Kirill Shchetiniuk X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Kirill Shchetiniuk via Devel Reply-To: Kirill Shchetiniuk X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749040474690116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Kirill Shchetiniuk Previously, the 'desktop' graphics configuration contained the 'fullscreen' option which was never used, removed the unused option. Signed-off-by: Kirill Shchetiniuk Reviewed-by: J=C3=A1n Tomko --- docs/formatdomain.rst | 5 ++--- src/conf/domain_conf.c | 17 ++--------------- src/conf/domain_conf.h | 1 - src/conf/schemas/domaincommon.rng | 5 ----- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 8753ee9c23..9940b2e38f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -6697,7 +6697,7 @@ interaction with the admin. - + @@ -6878,8 +6878,7 @@ interaction with the admin. ``desktop`` This value is reserved for VirtualBox domains for the moment. It dis= plays a window on the host desktop, similarly to "sdl", but using the Virt= ualBox - viewer. Just like "sdl", it accepts the optional attributes ``displa= y`` - and ``fullscreen``. + viewer. Just like "sdl", it accepts the optional attribute ``display= ``. =20 ``egl-headless`` :since:`Since 4.6.0` This display type provides support for an OpenGL accelerated display diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 201a4ded8b..be70ec3b96 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11961,20 +11961,11 @@ virDomainGraphicsDefParseXMLRDP(virDomainGraphics= Def *def, } =20 =20 -static int +static void virDomainGraphicsDefParseXMLDesktop(virDomainGraphicsDef *def, xmlNodePtr node) { - virTristateBool fullscreen; - - if (virXMLPropTristateBool(node, "fullscreen", VIR_XML_PROP_NONE, - &fullscreen) < 0) - return -1; - - virTristateBoolToBool(fullscreen, &def->data.desktop.fullscreen); def->data.desktop.display =3D virXMLPropString(node, "display"); - - return 0; } =20 =20 @@ -12260,8 +12251,7 @@ virDomainGraphicsDefParseXML(virDomainXMLOption *xm= lopt, goto error; break; case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: - if (virDomainGraphicsDefParseXMLDesktop(def, node) < 0) - goto error; + virDomainGraphicsDefParseXMLDesktop(def, node); break; case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: if (virDomainGraphicsDefParseXMLSpice(def, node, ctxt, flags) < 0) @@ -26998,9 +26988,6 @@ virDomainGraphicsDefFormatDesktop(virBuffer *attrBu= f, virDomainGraphicsDef *def) { virBufferEscapeString(attrBuf, " display=3D'%s'", def->data.desktop.di= splay); - - if (def->data.desktop.fullscreen) - virBufferAddLit(attrBuf, " fullscreen=3D'yes'"); } =20 static int diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c909cfba3f..5e02c15ed5 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2049,7 +2049,6 @@ struct _virDomainGraphicsDef { } rdp; struct { char *display; - bool fullscreen; } desktop; struct { int port; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 5597d5a66b..81afa10083 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -4573,11 +4573,6 @@ - - - - - --=20 2.49.0