monitor: Setup a QDict with arguments to handlers
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 28 Aug 2009 18:27:10 +0000 (15:27 -0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 4 Sep 2009 14:37:30 +0000 (09:37 -0500)
commitdce562c20986c3ce0836b8bf178299be632096b6
tree0a5ff5c33996dc0beb2cfee34d39a110c293d86a
parentc096767192806668f60e90f34e6b7e629ca06901
monitor: Setup a QDict with arguments to handlers

With this commit monitor_handle_command() will be able to setup a
QDict with arguments to command handlers.

However, the current 'args[]' method is still being used, next
changes will port commands to get their arguments from the dictionary.

Two changes are worth noting:

1. The '/' argument type always adds the following standard keys in the
dictionary: 'count', 'format' and 'size'. This way, the argument
name used in the 'args_type' string doesn't matter

2. The optional argument type '?' doesn't need to pass the additional
'has_arg' argument, hanlders can do the same check with qdict_haskey()

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c