[Qemu-devel] [PATCH] hxtool: remove dead -q option

Paolo Bonzini posted 1 patch 8 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170707154646.22230-1-pbonzini@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
scripts/hxtool | 46 +---------------------------------------------
1 file changed, 1 insertion(+), 45 deletions(-)
[Qemu-devel] [PATCH] hxtool: remove dead -q option
Posted by Paolo Bonzini 8 years, 4 months ago
This was used to extract .txt documentation for QMP.  This was
changed to use the QAPI schema instead, so zap it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/hxtool | 46 +---------------------------------------------
 1 file changed, 1 insertion(+), 45 deletions(-)

diff --git a/scripts/hxtool b/scripts/hxtool
index 5468cd7782..1e2c97c5e6 100644
--- a/scripts/hxtool
+++ b/scripts/hxtool
@@ -7,7 +7,7 @@ hxtoh()
         case $str in
             HXCOMM*)
             ;;
-            STEXI*|ETEXI*|SQMP*|EQMP*) flag=$(($flag^1))
+            STEXI*|ETEXI*) flag=$(($flag^1))
             ;;
             *)
             test $flag -eq 1 && printf "%s\n" "$str"
@@ -45,12 +45,6 @@ hxtotexi()
             fi
             flag=0
             ;;
-            SQMP*|EQMP*)
-            if test $flag -eq 1 ; then
-                printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2
-                exit 1
-            fi
-            ;;
             DEFHEADING*)
             print_texi_heading "$(expr "$str" : "DEFHEADING(\(.*\))")"
             ;;
@@ -65,47 +59,9 @@ hxtotexi()
     done
 }
 
-hxtoqmp()
-{
-    IFS=
-    flag=0
-    line=1
-    while read -r str; do
-        case "$str" in
-            HXCOMM*)
-            ;;
-            SQMP*)
-            if test $flag -eq 1 ; then
-                printf "line %d: syntax error: expected EQMP, found '%s'\n" "$line" "$str" >&2
-                exit 1
-            fi
-            flag=1
-            ;;
-            EQMP*)
-            if test $flag -ne 1 ; then
-                printf "line %d: syntax error: expected SQMP, found '%s'\n" "$line" "$str" >&2
-                exit 1
-            fi
-            flag=0
-            ;;
-            STEXI*|ETEXI*)
-            if test $flag -eq 1 ; then
-                printf "line %d: syntax error: expected EQMP, found '%s'\n" "$line" "$str" >&2
-                exit 1
-            fi
-            ;;
-            *)
-            test $flag -eq 1 && printf '%s\n' "$str"
-            ;;
-        esac
-        line=$((line+1))
-    done
-}
-
 case "$1" in
 "-h") hxtoh ;;
 "-t") hxtotexi ;;
-"-q") hxtoqmp ;;
 *) exit 1 ;;
 esac
 
-- 
2.13.0


Re: [Qemu-devel] [PATCH] hxtool: remove dead -q option
Posted by Eric Blake 8 years, 4 months ago
On 07/07/2017 10:46 AM, Paolo Bonzini wrote:
> This was used to extract .txt documentation for QMP.  This was
> changed to use the QAPI schema instead, so zap it.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  scripts/hxtool | 46 +---------------------------------------------
>  1 file changed, 1 insertion(+), 45 deletions(-)

Fun diffstat!

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] hxtool: remove dead -q option
Posted by Stefan Hajnoczi 8 years, 3 months ago
On Fri, Jul 07, 2017 at 05:46:46PM +0200, Paolo Bonzini wrote:
> This was used to extract .txt documentation for QMP.  This was
> changed to use the QAPI schema instead, so zap it.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  scripts/hxtool | 46 +---------------------------------------------
>  1 file changed, 1 insertion(+), 45 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [PATCH] hxtool: remove dead -q option
Posted by Michael Tokarev 8 years, 3 months ago
07.07.2017 18:46, Paolo Bonzini wrote:
> This was used to extract .txt documentation for QMP.  This was
> changed to use the QAPI schema instead, so zap it.

Applied to -trivial, thanks!

/mjt