From nobody Tue Sep 9 19:08:47 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=1748863003; cv=none; d=zohomail.com; s=zohoarc; b=hf2UUsFPogV+SJlpzjlxBxhXCGPXEmJi0ndXgwuu0CDUo5aLBuust2qPIogGI+60tLmRM1pASzmW75UxUaUbjYLQk6kR83M/SalFZRzOVvLGy6qjujJAy81Qjob5b2Wb3ASTzcNAESeIu12fPzCbrHOWjLN0I7ShAb3CgTrtwrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748863003; 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=iUPJ21+Xl0v30p6wk7Pjhu+mVhYP1mZNQI5Fv/tnAJw=; b=lA1VoIY0ke2Szph5mPdbjwbUPO0m0HIo3s/WcTmRtnKTmIC4lbxOPwRuWBcJ4qkqQ36ACPLzdom4pI3gIyGEMjOXOoNRh4neN1nDfgZ4iC6lS9pLhvM8nPrF+Lg+m0eeyc43CbBnXxe3gnNnNcFBBQwPDvbd3TI65IWZLy6x4BA= 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 1748863003209301.44712303995027; Mon, 2 Jun 2025 04:16:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3DDE4156D; Mon, 2 Jun 2025 07:16:42 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AB29A14E1; Mon, 2 Jun 2025 07:15:37 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7157213F3; Mon, 2 Jun 2025 07:15:30 -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 D258F138F for ; Mon, 2 Jun 2025 07:15:29 -0400 (EDT) Received: from mx-prod-mc-03.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-127-KHiSqwKXOiWXwNscI1s4uA-1; Mon, 02 Jun 2025 07:15:26 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 91EA819560AE for ; Mon, 2 Jun 2025 11:15:25 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A4C3D1800359; Mon, 2 Jun 2025 11:15:24 +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=1748862929; 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=owGsK5CxjQ6GYPfI6VAk3usJS+nOL74jDN43addVJ/4=; b=OvyqxtEpVd3hgJ4cf/TceX8T2oiVNps+juBMW7LrqG8QwDSBrxfJ/BNCx9GiR9r+0p7tpz xqzn6GUDzSezBzoswLs1DiEjsvLrb+QYzleic1sLp3MuAAmTP+0F7fZNbGbjaiqEmBzNz9 WfIjEivfXnNWchOSULdlW8kYd6FEQVM= X-MC-Unique: KHiSqwKXOiWXwNscI1s4uA-1 X-Mimecast-MFC-AGG-ID: KHiSqwKXOiWXwNscI1s4uA_1748862925 To: devel@lists.libvirt.org Subject: [PATCH 1/4] conf: VNC graphics parse refactor Date: Mon, 2 Jun 2025 12:39:40 +0200 Message-ID: <20250602111504.387917-2-kshcheti@redhat.com> In-Reply-To: <20250602111504.387917-1-kshcheti@redhat.com> References: <20250602111504.387917-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ErH-6wlECzNTmjWUIZOsQ5DFz3AUuULeZ9OK-yikK88_1748862925 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QDU7YI4ZBKXRHNY5WGZRUOSJOR3BWUCW X-Message-ID-Hash: QDU7YI4ZBKXRHNY5WGZRUOSJOR3BWUCW 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: 1748863004423116600 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 function 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 --- 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,47 +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, -- 2.49.0 From nobody Tue Sep 9 19:08:47 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=1748862980; cv=none; d=zohomail.com; s=zohoarc; b=nj5CbxG2fyVYp7wFAqzksRDg2IyJOiivJxbZz+faL2kU7Y+jarosgbz6TsjeCvk/cntcSPTa6VSNzDldAg8mVgLYveymVS+v99YBqAwjPYanm2kH2wnLJ2DXyZPybB6QzOxZWr3XD/fRCSqOgy6yzb0ntZyU3XYLIx/cLzuW+RU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748862980; 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=fMMLHrhoNeES6lWUtezz8gWVYYDAJwESDXvoRZDlcv8=; b=lo+BQdDE0KSgeFvFKeqT65sLC23P4cLHtQQJFKnsV6vN75G5p3RkeuZA2uaygo9tD+OnqyrgCTBx3N8R+TvS5DzVcCDpcgLvYsmd7sqq+UVOXL31lk2b/AXUrMxiHkXPXrHP2gIcZV+A9l77Lq6oBNNIFpeBQKDI+AihkojweEU= 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 1748862980154791.3162317702281; Mon, 2 Jun 2025 04:16:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2A29CC95; Mon, 2 Jun 2025 07:16:19 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id F09D61575; Mon, 2 Jun 2025 07:15:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DDDC01395; Mon, 2 Jun 2025 07:15:29 -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 5E323138C for ; Mon, 2 Jun 2025 07:15:29 -0400 (EDT) Received: from mx-prod-mc-04.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-167-XntDPFqKOc-54d-0UPf_Uw-1; Mon, 02 Jun 2025 07:15:27 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F2B3B19560B1 for ; Mon, 2 Jun 2025 11:15:26 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 10929180049D; Mon, 2 Jun 2025 11:15: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=1748862929; 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=2siveK3J8+HKO37lV2D7MEaUB2DF0y6FOjbuuRfzcmQ=; b=DwrN++/fLp4WDvFfL/WEyN/nPs59B6rwh++y39xOsXYsAuCI1n/DhfNKnuBjUs6tC4mJQw Af6ROjjdCI+MELBSawSS3z2EmlWAPZ9LESiRHRfa69QNDEVN/cR0y3qzXx8y6E78UcQIP+ 3YbX6YxUuXazmwVJaCD+pUeMoX9EVJE= X-MC-Unique: XntDPFqKOc-54d-0UPf_Uw-1 X-Mimecast-MFC-AGG-ID: XntDPFqKOc-54d-0UPf_Uw_1748862927 To: devel@lists.libvirt.org Subject: [PATCH 2/4] conf: SDL fullscreen option type refactor Date: Mon, 2 Jun 2025 12:39:41 +0200 Message-ID: <20250602111504.387917-3-kshcheti@redhat.com> In-Reply-To: <20250602111504.387917-1-kshcheti@redhat.com> References: <20250602111504.387917-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1Fa7YRCrqypQGR7isg6pj7dZqkMTjrG4MTFxnG9s15o_1748862927 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: UG6PANKFQTWY26WIEPR7OAJTMYLS4EXA X-Message-ID-Hash: UG6PANKFQTWY26WIEPR7OAJTMYLS4EXA 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: 1748862981986116600 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 --- 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,8 +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"); -- 2.49.0 From nobody Tue Sep 9 19:08:47 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=1748863039; cv=none; d=zohomail.com; s=zohoarc; b=YW6fC7wI0SWk55PcsharZgm8HdOUuKoDUO6O7wJlqA1wsQPiF3yJDHkX5xrIA9J6/b0XGVpsI61qfUHf8FplJuBOxYVU3zL43z+QY4aEoLk02kvjwK6OatH3/+akg0DDaOFi4V0Z1Xwi3W3sJErHh9Q2aw3uv4KFP1xoP/WSs2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748863039; 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=xxRq6VJ7AGIq07qwGr2VaDVkW5ZCS2XSeLs4VdnB8NI=; b=Ht+DqboGFnaQurNvwPx2ufdMyY7NlUeise0nWZs4ufJwIfxwwI8sTuBfAGTl7FGHNCVCDKL88mFFBgacLk8E1Hp4DwjGwqhSX1Lux5w+g4geotpPc5nUrxvVa5p9/lz5c7j0VILvrvWOA1txjNvdkTwd0ipGNldgJgwGz05RjA4= 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 174886303957165.23349892468457; Mon, 2 Jun 2025 04:17:19 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 381FB13DC; Mon, 2 Jun 2025 07:17:18 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 693CF1579; Mon, 2 Jun 2025 07:15:43 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9897815BA; Mon, 2 Jun 2025 07:15:37 -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 EC0D614BE for ; Mon, 2 Jun 2025 07:15:30 -0400 (EDT) Received: from mx-prod-mc-04.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-281-OSE_7D0PMvOa0TNeWN7Tcw-1; Mon, 02 Jun 2025 07:15:29 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 72C5A1955DAB for ; Mon, 2 Jun 2025 11:15:28 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68C94180049D; Mon, 2 Jun 2025 11:15:27 +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=1748862930; 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=y9hWBopJR39lO3so+W/eO8KcrWaSg0YQ8PAVyzapsVw=; b=QRuE1kQb3i6F21jFDqfw0b8Giw5A6uVBB7UGlAkUymiMWBFg1ytJZsQsa04kiigBorkv3i iwlv8mMVOcYh+iyyR0tazIttGGBKpPVEIesPDUpVtitIdmhRKP5Qm6mMs+EGg+yELnkE00 U9+JtYh4gSSN3YSthML8gYo4fla99Qk= X-MC-Unique: OSE_7D0PMvOa0TNeWN7Tcw-1 X-Mimecast-MFC-AGG-ID: OSE_7D0PMvOa0TNeWN7Tcw_1748862928 To: devel@lists.libvirt.org Subject: [PATCH 3/4] conf: RDP graphics parse refactor Date: Mon, 2 Jun 2025 12:39:42 +0200 Message-ID: <20250602111504.387917-4-kshcheti@redhat.com> In-Reply-To: <20250602111504.387917-1-kshcheti@redhat.com> References: <20250602111504.387917-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Js8S7jKhCDMfcFui8p7C8zalrTmtOCzPo2vzioZyG7c_1748862928 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VWBK6MNQ2X2YJ6T3N354A2YOARM5RUMR X-Message-ID-Hash: VWBK6MNQ2X2YJ6T3N354A2YOARM5RUMR 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: 1748863041075116600 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 was 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. The virDomainGraphicsDefFormatRDP fucntion was also refactored according to the type changes. Signed-off-by: Kirill Shchetiniuk --- 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,12 +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); } -- 2.49.0 From nobody Tue Sep 9 19:08:47 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=1748863061; cv=none; d=zohomail.com; s=zohoarc; b=ms93qIs9NAZy+pYesf9EjYXzjoR0udDXCIhLFh6poXAoiIYvpPojJQRDG9Us1MHdICEYAfSd3hu8qDOWYEGJLviKW45Dkh04fTNNoW8DiepgciFSapYvbPwfZZU5w+PwsIry1zSQFfwhKrZ+l/tT0luMLPYJpkq+4tk0Z1ZO/f0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748863061; 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=Zz55mbRCk3RvtfVPa9Va/FErzTcH35Ic4VelDG87bhsVwg3l4EXStUsAVdUx/wnLCezuZvasUOyV3IVDyCbn/aIa6G3+qZQ9X26YbgtL6HuMDinKd8OLra3yVa3zCFAqibe2/BT43x6Y4BxuDWZO9nMEh1o/B//wQzwY+/AfxDE= 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 1748863061312604.3702108127229; Mon, 2 Jun 2025 04:17:41 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 51EC713EA; Mon, 2 Jun 2025 07:17:40 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3178815B4; Mon, 2 Jun 2025 07:15:48 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C4F0815F0; Mon, 2 Jun 2025 07:15:43 -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 507E11571 for ; Mon, 2 Jun 2025 07:15:32 -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-584-qdqFd7YYNSC9cJIJouLiSQ-1; Mon, 02 Jun 2025 07:15:30 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 261111956087 for ; Mon, 2 Jun 2025 11:15:30 +0000 (UTC) Received: from kshcheti-thinkpadp1gen4i.tpbc.com (unknown [10.43.2.246]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C0B3C1800359; Mon, 2 Jun 2025 11:15:28 +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=1748862932; 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=ZGOyMvnBEw6o3fR3+EXTj3kCABEMZPQOeYpfBN8BTjTpPcWbYr6alhTkTqLAMnkwDpgShN SrwZnBnmQL1/cszg80aamvGpWWHAmHK3lHrd4IFlWS21VCaEjg5nJg0JHTX/04oQdTJyZN f6sE73p+MZltC1rMJApH4UtMKw8JeVw= X-MC-Unique: qdqFd7YYNSC9cJIJouLiSQ-1 X-Mimecast-MFC-AGG-ID: qdqFd7YYNSC9cJIJouLiSQ_1748862930 To: devel@lists.libvirt.org Subject: [PATCH 4/4] conf: desktop graphics remove unused option Date: Mon, 2 Jun 2025 12:39:43 +0200 Message-ID: <20250602111504.387917-5-kshcheti@redhat.com> In-Reply-To: <20250602111504.387917-1-kshcheti@redhat.com> References: <20250602111504.387917-1-kshcheti@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: nRypKbhI0yrVJt_baRp-NDuxdBaLO2yrIurifwkvOk0_1748862930 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3PK2D5ARBQ4SC4EJM4B5VHCB7ULC2CZS X-Message-ID-Hash: 3PK2D5ARBQ4SC4EJM4B5VHCB7ULC2CZS 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: 1748863063287116600 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 --- 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