diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-06-18 10:47:00 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-06-18 10:47:00 +0100 |
| commit | cdfaa2720f4a09e5254868bd1f6e33f3e9eae76f (patch) | |
| tree | c2fc47de84278d1aacad857a22b754b90cabf9e8 /docs/devel | |
| parent | 076243ffe6c1b687e9e6d98348c3bf3398df78f3 (diff) | |
| parent | 3c45f62570aeacadf4a05bfa1afaa12bea05ae86 (diff) | |
| download | focaccia-qemu-cdfaa2720f4a09e5254868bd1f6e33f3e9eae76f.tar.gz focaccia-qemu-cdfaa2720f4a09e5254868bd1f6e33f3e9eae76f.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2019-06-17-v2' into staging
Monitor patches for 2019-06-17
# gpg: Signature made Tue 18 Jun 2019 07:20:25 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-monitor-2019-06-17-v2:
vl: Deprecate -mon pretty=... for HMP monitors
monitor: Replace monitor_init() with monitor_init_{hmp, qmp}()
monitor: Split Monitor.flags into separate bools
monitor: Split out monitor/monitor.c
monitor: Split out monitor/hmp.c
monitor: Split out monitor/qmp.c
monitor: Create monitor-internal.h with common definitions
monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c
Move monitor.c to monitor/misc.c
monitor: Rename HMP command type and tables
monitor: Remove Monitor.cmd_table indirection
monitor: Create MonitorHMP with readline state
monitor: Make MonitorQMP a child class of Monitor
monitor: Split monitor_init in HMP and QMP function
monitor: Remove unused password prompting fields
monitor: Fix return type of monitor_fdset_dup_fd_find
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/devel')
| -rw-r--r-- | docs/devel/writing-qmp-commands.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/devel/writing-qmp-commands.txt b/docs/devel/writing-qmp-commands.txt index 9dfc62bf5a..46a6c48683 100644 --- a/docs/devel/writing-qmp-commands.txt +++ b/docs/devel/writing-qmp-commands.txt @@ -20,7 +20,7 @@ new QMP command. 2. Write the QMP command itself, which is a regular C function. Preferably, the command should be exported by some QEMU subsystem. But it can also be - added to the qmp.c file + added to the monitor/qmp-cmds.c file 3. At this point the command can be tested under the QMP protocol @@ -101,7 +101,8 @@ protocol data. The next step is to write the "hello-world" implementation. As explained earlier, it's preferable for commands to live in QEMU subsystems. But -"hello-world" doesn't pertain to any, so we put its implementation in qmp.c: +"hello-world" doesn't pertain to any, so we put its implementation in +monitor/qmp-cmds.c: void qmp_hello_world(Error **errp) { @@ -146,7 +147,7 @@ for mandatory arguments). Finally, 'str' is the argument's type, which stands for "string". The QAPI also supports integers, booleans, enumerations and user defined types. -Now, let's update our C implementation in qmp.c: +Now, let's update our C implementation in monitor/qmp-cmds.c: void qmp_hello_world(bool has_message, const char *message, Error **errp) { @@ -267,7 +268,7 @@ monitor (HMP). With the introduction of the QAPI, HMP commands make QMP calls. Most of the time HMP commands are simple wrappers. All HMP commands implementation exist in -the hmp.c file. +the monitor/hmp-cmds.c file. Here's the implementation of the "hello-world" HMP command: @@ -470,7 +471,7 @@ it's good practice to always check for errors. Another important detail is that HMP's "info" commands don't go into the hmp-commands.hx. Instead, they go into the info_cmds[] table, which is defined -in the monitor.c file. The entry for the "info alarmclock" follows: +in the monitor/misc.c file. The entry for the "info alarmclock" follows: { .name = "alarmclock", |