summaryrefslogtreecommitdiffstats
path: root/docs/devel
diff options
context:
space:
mode:
authorKevin Wolf2019-06-13 17:33:58 +0200
committerMarkus Armbruster2019-06-17 20:36:56 +0200
commitf1b3ccfaa682b7b5d0043ab934660a49e33d0139 (patch)
treed948d12adc9892df43ce33a1525a4b4301cf6090 /docs/devel
parentMove monitor.c to monitor/misc.c (diff)
downloadqemu-f1b3ccfaa682b7b5d0043ab934660a49e33d0139.tar.gz
qemu-f1b3ccfaa682b7b5d0043ab934660a49e33d0139.tar.xz
qemu-f1b3ccfaa682b7b5d0043ab934660a49e33d0139.zip
monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c
Now that we have a monitor/ subdirectory, let's move hmp.c and qmp.c from the root directory there. As they contain implementations of monitor commands, rename them to {hmp,qmp}-cmds.c, so that {hmp,qmp}.c are free for the HMP and QMP infrastructure. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190613153405.24769-9-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/writing-qmp-commands.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/devel/writing-qmp-commands.txt b/docs/devel/writing-qmp-commands.txt
index cc6ecd6d5d..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: