From: Markus Armbruster <armbru@redhat.com>
To: dave@treblig.org
Cc: armbru@redhat.com, berrange@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] hxtool: Split srst/erst add checks
Date: Thu, 15 Jan 2026 13:11:04 +0100 [thread overview]
Message-ID: <87y0lzvzxj.fsf@pond.sub.org> (raw)
In-Reply-To: <20260115020423.722069-4-dave@treblig.org> (dave@treblig.org's message of "Thu, 15 Jan 2026 02:04:22 +0000")
dave@treblig.org writes:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
>
> 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 <dave@treblig.org>
> ---
> scripts/hxtool | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/hxtool b/scripts/hxtool
> index 80516b9437..ea2accef98 100755
> --- a/scripts/hxtool
> +++ b/scripts/hxtool
> @@ -2,15 +2,29 @@
>
> hxtoh()
> {
> - flag=1
> + outsiderst=1
I parsed this "outsider st" and went "WAT? Backtrack... aha". Name it
outside_rst? in_h? Or revert sense and call it in_rst?
> while read -r str; do
> case $str in
> HXCOMM*)
> ;;
> - SRST*|ERST*) flag=$(($flag^1))
> + SRST*)
> + if [ $outsiderst -eq 0 ]
> + then
> + echo "Error: SRST inside another RST" >&2
> + exit 1
> + fi
> + outsiderst=0
> + ;;
> + ERST*)
> + if [ $outsiderst -eq 1 ]
> + then
> + echo "Error: ERST already outside RST" >&2
> + exit 1
> + fi
> + outsiderst=1
> ;;
> *)
> - test $flag -eq 1 && printf "%s\n" "$str"
> + test $outsiderst -eq 1 && printf "%s\n" "$str"
> ;;
> esac
> done
next prev parent reply other threads:[~2026-01-15 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 2:04 [PATCH 0/4] HMP: hxtool sanity checks dave
2026-01-15 2:04 ` [PATCH 1/4] hmp-commands-info.hx: Move definition of "info accel" dave
2026-01-15 2:04 ` [PATCH 2/4] hmp*hx: Move info docs dave
2026-01-15 11:57 ` Markus Armbruster
2026-01-15 18:42 ` Dr. David Alan Gilbert
2026-01-16 8:45 ` Markus Armbruster
2026-01-15 2:04 ` [PATCH 3/4] hxtool: Split srst/erst add checks dave
2026-01-15 12:11 ` Markus Armbruster [this message]
2026-01-15 2:04 ` [PATCH 4/4] hxtool: Error on missing docs dave
2026-01-15 12:17 ` Markus Armbruster
2026-01-15 12:43 ` Dr. David Alan Gilbert
2026-01-15 11:15 ` [PATCH 0/4] HMP: hxtool sanity checks Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y0lzvzxj.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.