diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-02-10 23:50:02 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-19 15:18:17 -0600 |
commit | 261394dbffbc847df9332cbd16011002e8761479 (patch) | |
tree | d04430f31eab18c3b700d8a73f0943b98b14982b /monitor.c | |
parent | 0bbc47bb21661706dac49321340e225dee10b81f (diff) |
Monitor: Rename cmd_new_ret()
Now that all handlers are converted to cmd_new_ret(), we can rename
it back to cmd_new(). But now it returns a value.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -98,13 +98,12 @@ typedef struct mon_cmd_t { const char *params; const char *help; void (*user_print)(Monitor *mon, const QObject *data); - int (*cmd_new_ret)(Monitor *mon, const QDict *params, QObject **ret_data); union { void (*info)(Monitor *mon); void (*info_new)(Monitor *mon, QObject **ret_data); int (*info_async)(Monitor *mon, MonitorCompletion *cb, void *opaque); void (*cmd)(Monitor *mon, const QDict *qdict); - void (*cmd_new)(Monitor *mon, const QDict *params, QObject **ret_data); + int (*cmd_new)(Monitor *mon, const QDict *params, QObject **ret_data); int (*cmd_async)(Monitor *mon, const QDict *params, MonitorCompletion *cb, void *opaque); } mhandler; @@ -3846,11 +3845,7 @@ static void monitor_call_handler(Monitor *mon, const mon_cmd_t *cmd, { QObject *data = NULL; - if (cmd->cmd_new_ret) { - cmd->cmd_new_ret(mon, params, &data); - } else { - cmd->mhandler.cmd_new(mon, params, &data); - } + cmd->mhandler.cmd_new(mon, params, &data); if (is_async_return(data)) { /* |