]> git.proxmox.com Git - qemu.git/commit - monitor.c
QMP: Don't use do_info()
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 10 Sep 2010 19:03:38 +0000 (16:03 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 1 Oct 2010 13:20:06 +0000 (10:20 -0300)
commit030db6e89d052fbf689b632d74026030bdf7a02a
tree4c86be18f56aa4533fba61bf55c26e8a62770bce
parent0fb88582e60e16e809c1aabc2c4b3e1f0832e267
QMP: Don't use do_info()

Since its inception, QMP has been using HMP's do_info() function
to run query commands.

This was a bad choice, as it made do_info() more complex and
contributed to couple QMP and HMP.

This commit fixes that by doing the following changes:

  1. Introduce qmp_find_query_cmd() and use it to directly lookup
     the info_cmds table

  2. Introduce qmp_call_query_cmd() so that QMP code is able
     to call query handlers without using do_info()

  3. Drop do_info() usage (via monitor_find_command("info"))

We need all the three changes in one shot so that we don't break
the calling of query commands in QMP.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor.c