diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-05 18:50:05 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-02 09:59:13 +0200 |
commit | 8a4f501c09bcb8b5a220699e378aa8fb7ec178e4 (patch) | |
tree | 8c6e2128027ede9391057bcdba7a5e73503f6286 /monitor.c | |
parent | 04e00c92ef75629a241ebc50537f75de0867928d (diff) | |
download | qemu-8a4f501c09bcb8b5a220699e378aa8fb7ec178e4.zip qemu-8a4f501c09bcb8b5a220699e378aa8fb7ec178e4.tar.gz qemu-8a4f501c09bcb8b5a220699e378aa8fb7ec178e4.tar.bz2 |
monitor: Drop unused "new" HMP command interface
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -123,7 +123,6 @@ typedef struct mon_cmd_t { const char *args_type; const char *params; const char *help; - void (*user_print)(Monitor *mon, const QObject *data); union { void (*cmd)(Monitor *mon, const QDict *qdict); int (*cmd_new)(Monitor *mon, const QDict *params, QObject **ret_data); @@ -378,11 +377,6 @@ static int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream, return 0; } -static inline int handler_is_qobject(const mon_cmd_t *cmd) -{ - return cmd->user_print != NULL; -} - static inline int monitor_has_error(const Monitor *mon) { return mon->error != NULL; @@ -4045,24 +4039,10 @@ static void handle_user_command(Monitor *mon, const char *cmdline) qdict = qdict_new(); cmd = monitor_parse_command(mon, cmdline, 0, mon->cmd_table, qdict); - if (!cmd) - goto out; - - if (handler_is_qobject(cmd)) { - QObject *data = NULL; - - /* XXX: ignores the error code */ - cmd->mhandler.cmd_new(mon, qdict, &data); - assert(!monitor_has_error(mon)); - if (data) { - cmd->user_print(mon, data); - qobject_decref(data); - } - } else { + if (cmd) { cmd->mhandler.cmd(mon, qdict); } -out: QDECREF(qdict); } |