The qapi2texi scripts generates a file to be included in a texi file. Add "QEMU QMP Reference Manual" and "QEMU Guest Agent Protocol Reference" master texi files. Move qmp-intro.txt into qemu-qmp-ref.texi, to widen its content on various installed target formats (man/txt/html/pdf/info..)
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- docs/qemu-ga-ref.texi | 65 ++++++++++++++++++ docs/qemu-qmp-ref.texi | 156 ++++++++++++++++++++++++++++++++++++++++++ docs/qmp-intro.txt | 87 ----------------------- docs/writing-qmp-commands.txt | 2 +- 4 files changed, 222 insertions(+), 88 deletions(-) create mode 100644 docs/qemu-ga-ref.texi create mode 100644 docs/qemu-qmp-ref.texi delete mode 100644 docs/qmp-intro.txt diff --git a/docs/qemu-ga-ref.texi b/docs/qemu-ga-ref.texi new file mode 100644 index 0000000..ad90712 --- /dev/null +++ b/docs/qemu-ga-ref.texi @@ -0,0 +1,65 @@ +\input texinfo +@setfilename qemu-ga-ref.info + +@exampleindent 0 +@paragraphindent 0 + +@settitle QEMU Guest Agent Protocol Reference + +@copying +This is the QEMU Guest Agent Protocol reference manual. + +Copyright @copyright{} 2016 The QEMU Project developers +@end copying + +@ifinfo +@dircategory QEMU +@direntry +* QEMU-GA-Ref: (qemu-ga-ref). QEMU Guest Agent Protocol Reference +@end direntry +@end ifinfo + +@titlepage +@title Guest Agent Protocol Reference Manual +@subtitle QEMU version @value{VERSION} +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents + +@ifnottex +@node Top +@top QEMU Guest Agent protocol reference +@end ifnottex + +@menu +* API Reference:: +* Commands and Events Index:: +* Data Types Index:: +@end menu + +@node API Reference +@chapter API Reference + +@c for texi2pod: +@c man begin DESCRIPTION + +@include qemu-ga-qapi.texi + +@c man end + +@c man begin SEEALSO +The HTML documentation of QEMU for more information. +@c man end + +@node Commands and Events Index +@unnumbered Commands and Events Index +@printindex fn + +@node Data Types Index +@unnumbered Data Types Index +@printindex tp + +@bye diff --git a/docs/qemu-qmp-ref.texi b/docs/qemu-qmp-ref.texi new file mode 100644 index 0000000..c1740ae --- /dev/null +++ b/docs/qemu-qmp-ref.texi @@ -0,0 +1,156 @@ +\input texinfo +@setfilename qemu-qmp-ref.info + +@exampleindent 0 +@paragraphindent 0 + +@settitle QEMU QMP Reference Manual + +@copying +This is the QEMU QMP reference manual. + +Copyright @copyright{} 2016 The QEMU Project developers +@end copying + +@ifinfo +@dircategory QEMU +@direntry +* QEMU-QMP-Ref: (qemu-qmp-ref). QEMU QMP Reference Manual +@end direntry +@end ifinfo + +@titlepage +@title QMP Reference Manual +@subtitle QEMU version @value{VERSION} +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents + +@ifnottex +@node Top +@top QEMU QMP reference +@end ifnottex + +@menu +* Introduction:: +* API Reference:: +* Commands and Events Index:: +* Data Types Index:: +@end menu + +@node Introduction +@chapter Introduction + +The QEMU Machine Protocol (@acronym{QMP}) allows applications to +operate a QEMU instance. + +QMP is @uref{http://www.json.org, JSON} based and features the +following: + +@itemize @bullet +@item +Lightweight, plain-text, easy to parse data format +@item +Asynchronous messages support (ie. events) +@item +Capabilities Negotiation +@item +Introspection +@end itemize + +For detailed information on QEMU Machine Protocol, the specification +is in @file{qmp-spec.txt}. + +@section Usage + +You can use the @option{-qmp} option to enable QMP. For example, the +following makes QMP available on localhost port 4444: + +@example +$ qemu [...] -qmp tcp:localhost:4444,server,nowait +@end example + +However, for more flexibility and to make use of more options, the +@option{-mon} command-line option should be used. For instance, the +following example creates one HMP instance (human monitor) on stdio +and one QMP instance on localhost port 4444: + +@example +$ qemu [...] -chardev socket,id=mon1,host=localhost,port=4444,server,nowait \ + -mon chardev=mon1,mode=control,pretty=on +@end example + +Please refer to QEMU's manpage for more information. + +@section Simple testing + +To manually test QMP one can connect with telnet and issue commands by +hand: + +@example +$ telnet localhost 4444 +Trying 127.0.0.1... +Connected to localhost. +Escape character is '^]'. +@{ + "QMP": @{ + "version": @{ + "qemu": @{ + "micro": 50, + "minor": 6, + "major": 1 + @}, + "package": "" + @}, + "capabilities": [ + ] + @} +@} + +@{ "execute": "qmp_capabilities" @} +@{ + "return": @{ + @} +@} + +@{ "execute": "query-status" @} +@{ + "return": @{ + "status": "prelaunch", + "singlestep": false, + "running": false + @} +@} +@end example + +@section Wiki + +Please refer to the @uref{http://wiki.qemu-project.org/QMP, QMP QEMU + wiki page} for more details on QMP. + +@node API Reference +@chapter API Reference + +@c for texi2pod: +@c man begin DESCRIPTION + +@include qemu-qapi.texi + +@c man end + +@c man begin SEEALSO +The HTML documentation of QEMU for more precise information. +@c man end + +@node Commands and Events Index +@unnumbered Commands and Events Index +@printindex fn + +@node Data Types Index +@unnumbered Data Types Index +@printindex tp + +@bye diff --git a/docs/qmp-intro.txt b/docs/qmp-intro.txt deleted file mode 100644 index f6a3a03..0000000 --- a/docs/qmp-intro.txt +++ /dev/null @@ -1,87 +0,0 @@ - QEMU Machine Protocol - ===================== - -Introduction ------------- - -The QEMU Machine Protocol (QMP) allows applications to operate a -QEMU instance. - -QMP is JSON[1] based and features the following: - -- Lightweight, text-based, easy to parse data format -- Asynchronous messages support (ie. events) -- Capabilities Negotiation - -For detailed information on QMP's usage, please, refer to the following files: - -o qmp-spec.txt QEMU Machine Protocol current specification -o qmp-commands.txt QMP supported commands (auto-generated at build-time) -o qmp-events.txt List of available asynchronous events - -[1] http://www.json.org - -Usage ------ - -You can use the -qmp option to enable QMP. For example, the following -makes QMP available on localhost port 4444: - -$ qemu [...] -qmp tcp:localhost:4444,server,nowait - -However, for more flexibility and to make use of more options, the -mon -command-line option should be used. For instance, the following example -creates one HMP instance (human monitor) on stdio and one QMP instance -on localhost port 4444: - -$ qemu [...] -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \ - -chardev socket,id=mon1,host=localhost,port=4444,server,nowait \ - -mon chardev=mon1,mode=control,pretty=on - -Please, refer to QEMU's manpage for more information. - -Simple Testing --------------- - -To manually test QMP one can connect with telnet and issue commands by hand: - -$ telnet localhost 4444 -Trying 127.0.0.1... -Connected to localhost. -Escape character is '^]'. -{ - "QMP": { - "version": { - "qemu": { - "micro": 50, - "minor": 6, - "major": 1 - }, - "package": "" - }, - "capabilities": [ - ] - } -} - -{ "execute": "qmp_capabilities" } -{ - "return": { - } -} - -{ "execute": "query-status" } -{ - "return": { - "status": "prelaunch", - "singlestep": false, - "running": false - } -} - -Please, refer to the qapi-schema.json file for a complete command reference. - -QMP wiki page -------------- - -http://wiki.qemu-project.org/QMP diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt index 44c14db..de54977 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs/writing-qmp-commands.txt @@ -8,7 +8,7 @@ into the QAPI framework implementation. For an in-depth introduction to the QAPI framework, please refer to docs/qapi-code-gen.txt. For documentation about the QMP protocol, -start with docs/qmp-intro.txt. +start with docs/qemu-qmp-ref.texi. == Overview == -- 2.10.0