From nobody Tue May 26 10:55:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777984545; cv=none; d=zohomail.com; s=zohoarc; b=kB7LEqixZmJaVlqx+6YUuZssOfXDhOUlp1cz7NxG86pxgiAgdI5SEK7b08NuAYQbI33/z+fEn0hTIWUt6Wtk0aF3K1YunNnLpMquIpBydoFNlUGC4q/SAhkywISq3j4X4UQOdSMGm3ZDQipz2xIBA7ViM2KLKWVg3lKWyowJ59c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777984545; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8LJ/PY35q50uBwYdkhyC+RqHy0XFW7jPX2haUv8L0n0=; b=MwaWsLkVpUCBa8MmaUuwhMpoluK9m1x+fp8EiT0WzDgzy1WqieQuPLBVYu6H5nMpl8gJlJyQpj4liWqRvYPzs+EwrGBdIx/7vCYnEBoObUHU1wD3Kxq8Z9AQivMF3vMUn1sI/YFSurdNclfq1zQkW5FhaRckIJ5znA+eGvuphvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777984545910473.97855056110507; Tue, 5 May 2026 05:35:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEzc-0002i6-1b; Tue, 05 May 2026 08:35:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzZ-0002fe-Bl for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzV-0006xM-FS for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:13 -0400 Received: from mx-prod-mc-08.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-517-ed1qM9csMIKEQ4mL8eWn0A-1; Tue, 05 May 2026 08:35:06 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8439E18005A9; Tue, 5 May 2026 12:35:05 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 165AD196B09E; Tue, 5 May 2026 12:35:04 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6C51921E6A02; Tue, 05 May 2026 14:35:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777984508; 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=8LJ/PY35q50uBwYdkhyC+RqHy0XFW7jPX2haUv8L0n0=; b=RffTRieXKjsecmkLSQC0/fhge8xptEJg2ng9mAgLvmPkfcU6+5FTYn4ThiWsgydqHmzFuN yPT8ifDRnpMSJNh8PU0OYOeJj+jc9p0T75QerfcgJRWcp1yS35nrZhHL/4s1WyppEQwXce 0Z8vRHR+RL9P1W+EuRXQ8vWB/yDi/xE= X-MC-Unique: ed1qM9csMIKEQ4mL8eWn0A-1 X-Mimecast-MFC-AGG-ID: ed1qM9csMIKEQ4mL8eWn0A_1777984505 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, "Dr. David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 1/4] hmp*hx: Move info docs Date: Tue, 5 May 2026 14:34:59 +0200 Message-ID: <20260505123502.1316554-2-armbru@redhat.com> In-Reply-To: <20260505123502.1316554-1-armbru@redhat.com> References: <20260505123502.1316554-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1777984549413154100 From: "Dr. David Alan Gilbert" Move the docs for the info subcommand from the separate hx into the top level file next to the 'info' command itself. That makes every command in the top level file have a RST section. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Markus Armbruster Message-ID: <20260504174914.122607-2-dave@treblig.org> Signed-off-by: Markus Armbruster --- hmp-commands-info.hx | 9 +-------- hmp-commands.hx | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 74c741f80e..964eed004c 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -8,14 +8,7 @@ HXCOMM HXCOMM In this file, generally SRST fragments should have two extra HXCOMM spaces of indent, so that the documentation list item for "info foo" HXCOMM appears inside the documentation list item for the top level -HXCOMM "info" documentation entry. The exception is the first SRST -HXCOMM fragment that defines that top level entry. - -SRST -``info`` *subcommand* - Show various information about the system state. - -ERST +HXCOMM "info" documentation entry. =20 { .name =3D "version", diff --git a/hmp-commands.hx b/hmp-commands.hx index 5cc4788f12..f4a6eeda93 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1814,16 +1814,6 @@ SRST command. ERST =20 - { - .name =3D "info", - .args_type =3D "item:s?", - .params =3D "[subcommand]", - .help =3D "show various information about the system state", - .cmd =3D hmp_info_help, - .sub_table =3D hmp_info_cmds, - .flags =3D "p", - }, - #if defined(CONFIG_FDT) { .name =3D "dumpdtb", @@ -1867,3 +1857,20 @@ SRST List event channels in the guest ERST #endif + +HXCOMM *** MUST BE LAST ENTRY ** + { + .name =3D "info", + .args_type =3D "item:s?", + .params =3D "[subcommand]", + .help =3D "show various information about the system state", + .cmd =3D hmp_info_help, + .sub_table =3D hmp_info_cmds, + .flags =3D "p", + }, + +SRST +``info`` *subcommand* + Show various information about the system state. +ERST +HXCOMM *** MUST BE LAST ENTRY ** --=20 2.54.0 From nobody Tue May 26 10:55:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777984563; cv=none; d=zohomail.com; s=zohoarc; b=N8dWAqr3TRs8evJsOAQNhEO3u9LE8k1QeaURb5rgw63vxGxkvJwd641cBBcaOAANpAcQ88HMAXa2za5M9r3hZPmNIR4BJOUbeoEV/f+DP/OMGVVj9NvfmxrsK22DHBZYFrxAz+q5cg/xW5pav72qUKCvLhnUsxZ/jdsXpZBg864= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777984563; h=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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5mKi/48bzyRVpnUGJc6MY3SnY4zBGlsfHELb3LFJeF8=; b=XYiIw8f+wDzCGcWM2mCPatY0+w3Qp9+V2C7Qh8VAkkjrxIyII9XOxHsr7MyVp8S4KOAAgS50cDJWDRJCpo4RP7sIghUvwgKnCwiXbU1FKo+n62gY6fewvAvwVeXQgoxG5Cx/9mJVivUovzDcNMEBoc6J3LciwCQya7ywPY6IDeY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777984563543235.6683208355181; Tue, 5 May 2026 05:36:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEzk-0002pD-54; Tue, 05 May 2026 08:35:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEza-0002fv-Fj for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzX-0006xV-Ki for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:14 -0400 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-517-cMrsPw5mOr-ZLk_Dr15btA-1; Tue, 05 May 2026 08:35:06 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 6FD4F1800451; Tue, 5 May 2026 12:35:05 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 16D511800446; Tue, 5 May 2026 12:35:04 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7072C21E6A03; Tue, 05 May 2026 14:35:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777984509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5mKi/48bzyRVpnUGJc6MY3SnY4zBGlsfHELb3LFJeF8=; b=cvuiGskRgnKd3bx9xHxLAAO7a1mvdxpRmK20QWlToDFNZUeiERs71sbDovwu1K7rUtPm4y rKeNS73+XH0LeVCPTsGkEOkQUxRkSOoIIDIauQ1CsiKXmdxpToRaTiYfR4UmolxpFSydo7 Bf1MOhb4ROtHB4aNDoBo0JpmJfdn8Eo= X-MC-Unique: cMrsPw5mOr-ZLk_Dr15btA-1 X-Mimecast-MFC-AGG-ID: cMrsPw5mOr-ZLk_Dr15btA_1777984505 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, "Dr. David Alan Gilbert" , Thomas Huth Subject: [PULL 2/4] hxtool: Split srst/erst add checks Date: Tue, 5 May 2026 14:35:00 +0200 Message-ID: <20260505123502.1316554-3-armbru@redhat.com> In-Reply-To: <20260505123502.1316554-1-armbru@redhat.com> References: <20260505123502.1316554-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1777984565206154100 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Split the SRST/ERST case and add some checks. This is mainly to make it easier to add some checks in following patches. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster Message-ID: <20260504174914.122607-3-dave@treblig.org> Signed-off-by: Markus Armbruster --- scripts/hxtool | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/hxtool b/scripts/hxtool index 80516b9437..51dc841479 100755 --- a/scripts/hxtool +++ b/scripts/hxtool @@ -2,15 +2,29 @@ =20 hxtoh() { - flag=3D1 + in_rst=3D0 while read -r str; do case $str in HXCOMM*) ;; - SRST*|ERST*) flag=3D$(($flag^1)) + SRST*) + if [ $in_rst -eq 1 ] + then + echo "Error: SRST inside another RST" >&2 + exit 1 + fi + in_rst=3D1 + ;; + ERST*) + if [ $in_rst -eq 0 ] + then + echo "Error: ERST already outside RST" >&2 + exit 1 + fi + in_rst=3D0 ;; *) - test $flag -eq 1 && printf "%s\n" "$str" + test $in_rst -eq 0 && printf "%s\n" "$str" ;; esac done --=20 2.54.0 From nobody Tue May 26 10:55:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777984546; cv=none; d=zohomail.com; s=zohoarc; b=iKGLYYPyJro6vzQ6ZlXG0aajangnPw+ZO7fkmWWXV3hsHf+uKLO3/ky/x9gA6X/peHmFNRF46ISRkNEnf/nRnlAPI9GhcsFQnVubJBsPHQtu7i3Rt5QezOhLs08rCekW4rSHQolb+1M5JOc/MoqC3V96wL+CEQew3OJzTOgsMiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777984546; h=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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YN96wE0xMfP184+ExrjUxV1C0+PzpEZRnQ6zKTfwyP0=; b=Id18+BtTyfaUMISIv345hhRGc4yuzt7oZobo216MoM94uFIWazT0y5rx29EPskYW9M0/m1T44KsNKVLupuLUPZja4Y+oY/C5Xs+LfpglNjwxng0HZVy/iRneGXaSm8ygL7jwzv0XLijml16AgiLYbdMEZg+iyYz0TYwzpkOECVA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777984546205511.048901149828; Tue, 5 May 2026 05:35:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEzj-0002o3-M6; Tue, 05 May 2026 08:35:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzZ-0002fa-6T for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzV-0006xJ-DV for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:12 -0400 Received: from mx-prod-mc-01.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-199-yPifRvY3P4S086xChJqicQ-1; Tue, 05 May 2026 08:35:06 -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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 75D7A1956095; Tue, 5 May 2026 12:35:05 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 24A0B1800347; Tue, 5 May 2026 12:35:04 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7448B21E6A05; Tue, 05 May 2026 14:35:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777984507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YN96wE0xMfP184+ExrjUxV1C0+PzpEZRnQ6zKTfwyP0=; b=h4JG4Yqq0LdM/urVQMmFVaFo9a/iok84pAXuUFDD5rCvA6WAZ1PW4Txtzgay5qQcJhuutX EL1yZkOSv8SlUO/+QXfXA2RXmsiCUJaXt3l+VY3xqdopQSn8LVm50DX1F4LknFWRqYLbdS rH4GJdevjIX6JnUrfuWcu0F1yKtgEe8= X-MC-Unique: yPifRvY3P4S086xChJqicQ-1 X-Mimecast-MFC-AGG-ID: yPifRvY3P4S086xChJqicQ_1777984505 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, "Dr. David Alan Gilbert" Subject: [PULL 3/4] hxtool: Error on missing docs Date: Tue, 5 May 2026 14:35:01 +0200 Message-ID: <20260505123502.1316554-4-armbru@redhat.com> In-Reply-To: <20260505123502.1316554-1-armbru@redhat.com> References: <20260505123502.1316554-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1777984549216154101 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Error if a '.name' is seen after another '.name' without an intervening SRST, this normally indicates missing or misplaced docs. We can't check DEF (as used in command line options) because those often have multiple DEF per doc. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster With the two minor tidy ups from Thomas's review Message-ID: <20260504174914.122607-4-dave@treblig.org> Signed-off-by: Markus Armbruster --- scripts/hxtool | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/hxtool b/scripts/hxtool index 51dc841479..617a694eaf 100755 --- a/scripts/hxtool +++ b/scripts/hxtool @@ -1,8 +1,15 @@ #!/bin/sh =20 +print_if_not_rst() +{ + test $in_rst -eq 0 && printf "%s\n" "$str" +} + hxtoh() { in_rst=3D0 + # .name for HMP + seen_name=3D0 while read -r str; do case $str in HXCOMM*) @@ -13,6 +20,8 @@ hxtoh() echo "Error: SRST inside another RST" >&2 exit 1 fi + # consume the name + seen_name=3D0 in_rst=3D1 ;; ERST*) @@ -23,8 +32,18 @@ hxtoh() fi in_rst=3D0 ;; + # Note the space at the start - we need to exclude something.n= ame + ( .name*) + if [ $seen_name -eq 1 ] + then + echo "Error: Seen another .name, maybe missing docs?" >&2 + exit 1 + fi + seen_name=3D1 + print_if_not_rst + ;; *) - test $in_rst -eq 0 && printf "%s\n" "$str" + print_if_not_rst ;; esac done --=20 2.54.0 From nobody Tue May 26 10:55:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777984545; cv=none; d=zohomail.com; s=zohoarc; b=H+C8puz2xVOq/Z5khAoOcmMXTvoPPNe1LBnawrxOzY8rvXPkYvae+NMripOb9qk2rckAZZiZRGRSlf6RWBCypA06rPIyA2e226xeRaheOPeeCsZIaBY2FqIRcggomq7wK1v3aalrGxKS4ayB+q4TwM4+vSUFYMRPBwYdBdfO1CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777984545; h=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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZJPaQGKTFYtCjJTMw017bT/rDK8tm7G0cZL44q3ASsY=; b=Q1ZsXaA8eXM391k0Yl7JGUrmoByZscOiJkj2wST8yorc2e4Z/MOjoL3G/CX++tQM3QdGCut8cMZBIUaVOEofQsSoip38w0qTedx/bytPmerwDVvKER0w3fP/bBA6l9wTG7besTfmfAs2YmD4CCQYQxcljr0v4ZHpCf8HhD/BFRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777984545970537.2275367579723; Tue, 5 May 2026 05:35:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEzf-0002mz-S5; Tue, 05 May 2026 08:35:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEza-0002gE-JU for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEzX-0006xL-KV for qemu-devel@nongnu.org; Tue, 05 May 2026 08:35:14 -0400 Received: from mx-prod-mc-01.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-372-OMQO-5D2ON6t_Rad8LFEEQ-1; Tue, 05 May 2026 08:35:06 -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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 551E319560A1; Tue, 5 May 2026 12:35:05 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D37AA1800480; Tue, 5 May 2026 12:35:04 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7830221E6A07; Tue, 05 May 2026 14:35:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777984508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZJPaQGKTFYtCjJTMw017bT/rDK8tm7G0cZL44q3ASsY=; b=dnNf+0/LtUdRzWHQezirMG+wDR/YqwfThJxcKQ+bLI/2Sqt9sFxxOPc2SyD8z5UHkdm2mz XScmy8ZAKVMhqbAbSBJ+h7dLzrmgsaGbK40obCKS//6YqckiBRRsygSzXXTIRQP098drbz FkzIqu9IOE+BrkPvyzick9hJNK/7qT0= X-MC-Unique: OMQO-5D2ON6t_Rad8LFEEQ-1 X-Mimecast-MFC-AGG-ID: OMQO-5D2ON6t_Rad8LFEEQ_1777984505 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, "AlanoSong@163.com" , "Dr. David Alan Gilbert" Subject: [PULL 4/4] monitor: Add `clear` command Date: Tue, 5 May 2026 14:35:02 +0200 Message-ID: <20260505123502.1316554-5-armbru@redhat.com> In-Reply-To: <20260505123502.1316554-1-armbru@redhat.com> References: <20260505123502.1316554-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1777984549114154100 Content-Type: text/plain; charset="utf-8" From: "AlanoSong@163.com" The monitor screen can be cluttered after executing commands like `info qtree`. It is useful to have a command to clear current screen, just like linux `clear` command do. This patch has been tested under monitors using stdio, vc, tcp socket, unix socket and serial interfaces. Signed-off-by: Alano Song Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert Message-ID: <20260504174914.122607-5-dave@treblig.org> Signed-off-by: Markus Armbruster --- include/monitor/hmp.h | 1 + monitor/hmp-cmds.c | 11 +++++++++++ hmp-commands.hx | 14 ++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index e222bea60c..9b66458d21 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -165,6 +165,7 @@ void hmp_trace_event(Monitor *mon, const QDict *qdict); void hmp_trace_file(Monitor *mon, const QDict *qdict); void hmp_info_trace_events(Monitor *mon, const QDict *qdict); void hmp_help(Monitor *mon, const QDict *qdict); +void hmp_clear(Monitor *mon, const QDict *qdict); void hmp_info_help(Monitor *mon, const QDict *qdict); void hmp_info_sync_profile(Monitor *mon, const QDict *qdict); void hmp_info_history(Monitor *mon, const QDict *qdict); diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index afa7b709a6..1b44d07c18 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -219,6 +219,17 @@ void hmp_help(Monitor *mon, const QDict *qdict) hmp_help_cmd(mon, qdict_get_try_str(qdict, "name")); } =20 +void hmp_clear(Monitor *mon, const QDict *qdict) +{ + /* + * Send an ANSI escape sequence: + * "\x1b[H" - move cursor to top-left + * "\x1b[2J" - clear visible screen + * "\x1b[3J" - clear scrollback + */ + monitor_printf(mon, "\x1b[H\x1b[2J\x1b[3J"); +} + void hmp_info_help(Monitor *mon, const QDict *qdict) { hmp_help_cmd(mon, "info"); diff --git a/hmp-commands.hx b/hmp-commands.hx index f4a6eeda93..b806ec5635 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -20,6 +20,20 @@ SRST Show the help for all commands or just for command *cmd*. ERST =20 + { + .name =3D "clear", + .args_type =3D "", + .params =3D "", + .help =3D "clear the monitor screen", + .cmd =3D hmp_clear, + .flags =3D "p", + }, + +SRST +``clear`` + Clear the monitor screen. +ERST + { .name =3D "commit", .args_type =3D "device:B", --=20 2.54.0