]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c
authorKevin Wolf <kwolf@redhat.com>
Thu, 13 Jun 2019 15:33:58 +0000 (17:33 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 17 Jun 2019 18:36:56 +0000 (20:36 +0200)
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>
MAINTAINERS
Makefile.objs
docs/devel/writing-qmp-commands.txt
monitor/Makefile.objs
monitor/hmp-cmds.c [moved from hmp.c with 99% similarity]
monitor/qmp-cmds.c [moved from qmp.c with 99% similarity]

index 575ea6e68d041a574e875b990a63da4682989b56..3c7d36672714dcf685d0b8b4c90c992f104b0db6 100644 (file)
@@ -1919,7 +1919,8 @@ Human Monitor (HMP)
 M: Dr. David Alan Gilbert <dgilbert@redhat.com>
 S: Maintained
 F: monitor/misc.c
-F: hmp.[ch]
+F: monitor/hmp*
+F: hmp.h
 F: hmp-commands*.hx
 F: include/monitor/hmp-target.h
 F: tests/test-hmp.c
@@ -2039,7 +2040,7 @@ F: tests/check-qom-proplist.c
 QMP
 M: Markus Armbruster <armbru@redhat.com>
 S: Supported
-F: qmp.c
+F: monitor/qmp*
 F: monitor/misc.c
 F: docs/devel/*qmp-*
 F: docs/interop/*qmp-*
index dd39a70b481bac7ef7b20969239bda9458cc6696..9495fcbc7ee15bc7c61e23491553eb91780b3e9c 100644 (file)
@@ -83,8 +83,8 @@ common-obj-$(CONFIG_FDT) += device_tree.o
 ######################################################################
 # qapi
 
-common-obj-y += qmp.o hmp.o
 common-obj-y += qapi/
+common-obj-y += monitor/
 endif
 
 #######################################################################
index cc6ecd6d5d4dd8520e4ad5e2612f3f60cd1a7812..46a6c48683f5526cda924f60f2310451a6dee3c1 100644 (file)
@@ -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:
 
index e783b0616b3ffe6387706192170ee11b5e9a87f8..a7170af6e1bf119afc3610aaa263afcab1dfa589 100644 (file)
@@ -1 +1,2 @@
 obj-y += misc.o
+common-obj-y += qmp-cmds.o hmp-cmds.o
similarity index 99%
rename from hmp.c
rename to monitor/hmp-cmds.c
index e6ea7cb9c26889fe4ccd43444a724c7482f9e6a2..c917e24d9c40b1224d48f8142df7f5d0be240598 100644 (file)
--- a/hmp.c
@@ -1,5 +1,5 @@
 /*
- * Human Monitor Interface
+ * Human Monitor Interface commands
  *
  * Copyright IBM, Corp. 2011
  *
similarity index 99%
rename from qmp.c
rename to monitor/qmp-cmds.c
index 679756844459ba4ada0288505a96e70b0bb793bf..f1b1e4f08b760275783c1d63e2d8e80a1f953912 100644 (file)
--- a/qmp.c
@@ -1,5 +1,5 @@
 /*
- * QEMU Management Protocol
+ * QEMU Management Protocol commands
  *
  * Copyright IBM, Corp. 2011
  *