Patchwork [for-1.4] hmp: Disable chardev-add and chardev-remove

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 6, 2013, 4:07 p.m.
Message ID <1360166866-30105-1-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/218681/
State New
Headers show

Comments

Markus Armbruster - Feb. 6, 2013, 4:07 p.m.
As a general rule, HMP commands must be built on top of the QMP API.
Luiz and others have worked long & hard to make HMP conform to this
rule.

Commit f1088908 added chardev-add, in violation of this rule.  QMP
command chardev-add was added right before, with minimal features, and
the idea to complete it step by step, then switch over the HMP command
to use it.

Unfortunately, we're not there, yet, and we don't want to release with
chardev-add in a "HMP is more powerful than QMP" state.

Disable the HMP command for now, along with its chardev-remove buddy.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hmp-commands.hx | 63 +++++++++++++++++++++++++++++----------------------------
 1 file changed, 32 insertions(+), 31 deletions(-)
Gerd Hoffmann - Feb. 6, 2013, 4:29 p.m.
On 02/06/13 17:07, Markus Armbruster wrote:
> Disable the HMP command for now, along with its chardev-remove buddy.

<nitpick>
  qmp and hmp chardev-remove are identical
</nitpick>

Makes sense nevertheless for symmetry reasons.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd
Anthony Liguori - Feb. 7, 2013, 1:43 a.m.
Applied.  Thanks.

Regards,

Anthony Liguori

Patch

diff --git a/hmp-commands.hx b/hmp-commands.hx
index bdd48f3..034a510 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1523,37 +1523,38 @@  passed since 1970, i.e. unix epoch.
 @end table
 ETEXI
 
-    {
-        .name       = "chardev-add",
-        .args_type  = "args:s",
-        .params     = "args",
-        .help       = "add chardev",
-        .mhandler.cmd = hmp_chardev_add,
-    },
-
-STEXI
-@item chardev_add args
-@findex chardev_add
-
-chardev_add accepts the same parameters as the -chardev command line switch.
-
-ETEXI
-
-    {
-        .name       = "chardev-remove",
-        .args_type  = "id:s",
-        .params     = "id",
-        .help       = "remove chardev",
-        .mhandler.cmd = hmp_chardev_remove,
-    },
-
-STEXI
-@item chardev_remove id
-@findex chardev_remove
-
-Removes the chardev @var{id}.
-
-ETEXI
+HXCOMM Disabled for now, because it isn't built on top of QMP's chardev-add
+HXCOMM     {
+HXCOMM         .name       = "chardev-add",
+HXCOMM         .args_type  = "args:s",
+HXCOMM         .params     = "args",
+HXCOMM         .help       = "add chardev",
+HXCOMM         .mhandler.cmd = hmp_chardev_add,
+HXCOMM     },
+HXCOMM
+HXCOMM STEXI
+HXCOMM @item chardev_add args
+HXCOMM @findex chardev_add
+HXCOMM
+HXCOMM chardev_add accepts the same parameters as the -chardev command line switch.
+HXCOMM
+HXCOMM ETEXI
+HXCOMM
+HXCOMM     {
+HXCOMM         .name       = "chardev-remove",
+HXCOMM         .args_type  = "id:s",
+HXCOMM         .params     = "id",
+HXCOMM         .help       = "remove chardev",
+HXCOMM         .mhandler.cmd = hmp_chardev_remove,
+HXCOMM     },
+HXCOMM
+HXCOMM STEXI
+HXCOMM @item chardev_remove id
+HXCOMM @findex chardev_remove
+HXCOMM
+HXCOMM Removes the chardev @var{id}.
+HXCOMM
+HXCOMM ETEXI
 
     {
         .name       = "info",