Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-13 Thread Markus Armbruster
Marc-André Lureau  writes:

> Hi
>
> On Tue, Sep 13, 2016 at 1:54 AM Peter Maydell 
> wrote:
>
>> On 12 September 2016 at 10:19, Marc-André Lureau
>>  wrote:
>> > The only remaining function of qmp-commands.hx is to let us generate
>> > qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
>> >
>> > We intend to move the documentation into the QAPI schema and generate
>> > qapi-commands.txt from it, but not right now.
>>
>> This is a bit sad, though I see that there were not all that
>> many actual docstrings to autogenerate from.

Actually no sadder than before.  This patch merely drops the parts of
qmp-commands.hx that are no longer used, then renames the result to
docs/qmp-commands.txt.  No change to the duplication of docs with the
QAPI schema.  The actual de-duplication is in Marc-André's queue.

>> What's the plan for reintroducing autogeneration of the
>> protocol docs?
>>
>>
> I'll rebase my qapi-doc branch, do some cleanups, and submit (last update:
> https://github.com/elmarco/qemu/commits/qapi-doc). Trouble is the series
> got pretty large after I splitted all the documentation move. It's over 150
> patches iirc, but it helps a lot with reviewing. Should I send it by
> chunks, or should I send a single patch and points to the github branch for
> the details? other options?

Let's try chunks.



Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-13 Thread Markus Armbruster
Eric Blake  writes:

> On 09/12/2016 04:19 AM, Marc-André Lureau wrote:
>> The only remaining function of qmp-commands.hx is to let us generate
>> qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
>> 
>> We intend to move the documentation into the QAPI schema and generate
>> qapi-commands.txt from it, but not right now.
>> 
>> Signed-off-by: Marc-André Lureau 
>> ---
>>  Makefile |6 +-
>>  .gitignore   |1 -
>>  MAINTAINERS  |1 -
>>  docs/qapi-code-gen.txt   |6 +-
>>  qmp-commands.hx => docs/qmp-commands.txt | 1127 
>> --
>>  docs/writing-qmp-commands.txt|   38 -
>>  6 files changed, 4 insertions(+), 1175 deletions(-)
>>  rename qmp-commands.hx => docs/qmp-commands.txt (87%)
>> 
>
>> +++ b/MAINTAINERS
>> @@ -1237,7 +1237,6 @@ M: Markus Armbruster 
>>  S: Supported
>>  F: qmp.c
>>  F: monitor.c
>> -F: qmp-commands.hx
>>  F: docs/*qmp-*
>>  F: scripts/qmp/
>>  T: git git://repo.or.cz/qemu/armbru.git qapi-next
>
> Shouldn't we be adding F: qmp-commands.txt somewhere to the file in the
> interim, at least until the promised later patch lands that once again
> generates documentation (this time from .json files)?

It's covered by the existing F: docs/*qmp-* line.



Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-12 Thread Marc-André Lureau
Hi

On Tue, Sep 13, 2016 at 1:54 AM Peter Maydell 
wrote:

> On 12 September 2016 at 10:19, Marc-André Lureau
>  wrote:
> > The only remaining function of qmp-commands.hx is to let us generate
> > qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
> >
> > We intend to move the documentation into the QAPI schema and generate
> > qapi-commands.txt from it, but not right now.
>
> This is a bit sad, though I see that there were not all that
> many actual docstrings to autogenerate from.
>
> What's the plan for reintroducing autogeneration of the
> protocol docs?
>
>
I'll rebase my qapi-doc branch, do some cleanups, and submit (last update:
https://github.com/elmarco/qemu/commits/qapi-doc). Trouble is the series
got pretty large after I splitted all the documentation move. It's over 150
patches iirc, but it helps a lot with reviewing. Should I send it by
chunks, or should I send a single patch and points to the github branch for
the details? other options?

-- 
Marc-André Lureau


Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-12 Thread Peter Maydell
On 12 September 2016 at 10:19, Marc-André Lureau
 wrote:
> The only remaining function of qmp-commands.hx is to let us generate
> qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
>
> We intend to move the documentation into the QAPI schema and generate
> qapi-commands.txt from it, but not right now.

This is a bit sad, though I see that there were not all that
many actual docstrings to autogenerate from.

What's the plan for reintroducing autogeneration of the
protocol docs?

thanks
-- PMM



Re: [Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-12 Thread Eric Blake
On 09/12/2016 04:19 AM, Marc-André Lureau wrote:
> The only remaining function of qmp-commands.hx is to let us generate
> qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.
> 
> We intend to move the documentation into the QAPI schema and generate
> qapi-commands.txt from it, but not right now.
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  Makefile |6 +-
>  .gitignore   |1 -
>  MAINTAINERS  |1 -
>  docs/qapi-code-gen.txt   |6 +-
>  qmp-commands.hx => docs/qmp-commands.txt | 1127 
> --
>  docs/writing-qmp-commands.txt|   38 -
>  6 files changed, 4 insertions(+), 1175 deletions(-)
>  rename qmp-commands.hx => docs/qmp-commands.txt (87%)
> 

> +++ b/MAINTAINERS
> @@ -1237,7 +1237,6 @@ M: Markus Armbruster 
>  S: Supported
>  F: qmp.c
>  F: monitor.c
> -F: qmp-commands.hx
>  F: docs/*qmp-*
>  F: scripts/qmp/
>  T: git git://repo.or.cz/qemu/armbru.git qapi-next

Shouldn't we be adding F: qmp-commands.txt somewhere to the file in the
interim, at least until the promised later patch lands that once again
generates documentation (this time from .json files)?

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


[Qemu-devel] [PATCH v6 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt

2016-09-12 Thread Marc-André Lureau
The only remaining function of qmp-commands.hx is to let us generate
qmp-commands.txt from it.  Replace qmp-commands.hx by qmp-commands.txt.

We intend to move the documentation into the QAPI schema and generate
qapi-commands.txt from it, but not right now.

Signed-off-by: Marc-André Lureau 
---
 Makefile |6 +-
 .gitignore   |1 -
 MAINTAINERS  |1 -
 docs/qapi-code-gen.txt   |6 +-
 qmp-commands.hx => docs/qmp-commands.txt | 1127 --
 docs/writing-qmp-commands.txt|   38 -
 6 files changed, 4 insertions(+), 1175 deletions(-)
 rename qmp-commands.hx => docs/qmp-commands.txt (87%)

diff --git a/Makefile b/Makefile
index d8a2891..bac69b2 100644
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,6 @@ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
 
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
-DOCS+=qmp-commands.txt
 ifdef CONFIG_VIRTFS
 DOCS+=fsdev/virtfs-proxy-helper.1
 endif
@@ -432,7 +431,7 @@ endif
 install-doc: $(DOCS)
$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
-   $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
+   $(INSTALL_DATA) docs/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
 ifdef CONFIG_POSIX
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
@@ -555,9 +554,6 @@ qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx 
$(SRC_PATH)/scripts/hxtool
 qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx 
$(SRC_PATH)/scripts/hxtool
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"  GEN  
 $@")
 
-qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx $(SRC_PATH)/scripts/hxtool
-   $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@,"  GEN  
 $@")
-
 qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"  GEN  
 $@")
 
diff --git a/.gitignore b/.gitignore
index 88ec249..0ab8263 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,7 +53,6 @@
 /qemu-bridge-helper
 /qemu-monitor.texi
 /qemu-monitor-info.texi
-/qmp-commands.txt
 /vscclient
 /fsdev/virtfs-proxy-helper
 *.[1-9]
diff --git a/MAINTAINERS b/MAINTAINERS
index b6fb84e..84bdc46 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1237,7 +1237,6 @@ M: Markus Armbruster 
 S: Supported
 F: qmp.c
 F: monitor.c
-F: qmp-commands.hx
 F: docs/*qmp-*
 F: scripts/qmp/
 T: git git://repo.or.cz/qemu/armbru.git qapi-next
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index de298dc..5d4c2cd 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -964,9 +964,9 @@ Example:
 
 Used to generate the marshaling/dispatch functions for the commands
 defined in the schema. The generated code implements
-qmp_marshal_COMMAND() (mentioned in qmp-commands.hx, and registered
-automatically), and declares qmp_COMMAND() that the user must
-implement.  The following files are generated:
+qmp_marshal_COMMAND() (registered automatically), and declares
+qmp_COMMAND() that the user must implement.  The following files are
+generated:
 
 $(prefix)qmp-marshal.c: command marshal/dispatch functions for each
 QMP command defined in the schema. Functions
diff --git a/qmp-commands.hx b/docs/qmp-commands.txt
similarity index 87%
rename from qmp-commands.hx
rename to docs/qmp-commands.txt
index b38772c..acebeb3 100644
--- a/qmp-commands.hx
+++ b/docs/qmp-commands.txt
@@ -1,8 +1,3 @@
-HXCOMM QMP dispatch table and documentation
-HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
-HXCOMM does not show up in the other formats.
-
-SQMP
 QMP Supported Commands
 --
 
@@ -58,14 +53,6 @@ If you're planning to adopt QMP, please observe the 
following:
 Server's responses in the examples below are always a success response, please
 refer to the QMP specification for more details on error responses.
 
-EQMP
-
-{
-.name   = "quit",
-.args_type  = "",
-},
-
-SQMP
 quit
 
 
@@ -78,14 +65,6 @@ Example:
 -> { "execute": "quit" }
 <- { "return": {} }
 
-EQMP
-
-{
-.name   = "eject",
-.args_type  = "force:-f,device:B",
-},
-
-SQMP
 eject
 -
 
@@ -103,14 +82,6 @@ Example:
 
 Note: The "force" argument defaults to false.
 
-EQMP
-
-{
-.name   = "change",
-.args_type  = "device:B,target:F,arg:s?",
-},
-
-SQMP
 change
 --
 
@@ -138,14 +109,6 @@ Examples:
 "arg": "foobar1" } }
 <- { "return": {} }
 
-EQMP
-
-{
-.name   = "screendump",
-.args_type  = "filename:F",
-},
-
-SQMP
 screendump
 --
 
@@