]> git.proxmox.com Git - qemu.git/commit
QMP: New argument checker (first part)
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 26 May 2010 19:13:09 +0000 (16:13 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 1 Jul 2010 17:27:13 +0000 (14:27 -0300)
commit2dbc8db0ba9e34b168c3b79a6c5435f770d3796e
treedeb68ee619efa043a40c7d1354f6208c453f2c05
parenteb159d13ee36a9ef2a83e3ab66f1b2ae1cc2d9f1
QMP: New argument checker (first part)

Current QMP's argument checker is more complex than it should be
and has (at least) one serious bug: it ignores unknown arguments.

To solve both problems we introduce a new argument checker. It's
added on top of the existing one, so that there are no regressions
during the transition.

This commit introduces the first part of the new checker, which
is run by qmp_check_client_args() and does the following:

  1. Check if all mandatory arguments were provided
  2. Set flags for argument validation

In order to do that, we transform the args_type string (from
qemu-montor.hx) into a qdict and iterate over it.

Next commit adds the new checker's second part: type checking and
invalid argument detection.

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