From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39631 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwKxc-0000cT-9t for qemu-devel@nongnu.org; Thu, 16 Sep 2010 16:21:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwKxZ-0001RZ-Ki for qemu-devel@nongnu.org; Thu, 16 Sep 2010 16:21:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15220) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwKxZ-0001RK-Ed for qemu-devel@nongnu.org; Thu, 16 Sep 2010 16:21:33 -0400 From: Luiz Capitulino Date: Thu, 16 Sep 2010 17:20:57 -0300 Message-Id: <1284668464-15981-12-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1284668464-15981-1-git-send-email-lcapitulino@redhat.com> References: <1284668464-15981-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 11/18] QMP: Simplify do_info_commands() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, armbru@redhat.com We now iterate over QMP's dispatch tables, no need to check for QMP-only handlers anymore. Signed-off-by: Luiz Capitulino --- monitor.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/monitor.c b/monitor.c index 53f8665..6998b3f 100644 --- a/monitor.c +++ b/monitor.c @@ -746,18 +746,13 @@ static void do_info_commands(Monitor *mon, QObject **ret_data) cmd_list = qlist_new(); for (cmd = qmp_cmds; cmd->name != NULL; cmd++) { - if (monitor_handler_ported(cmd) && !monitor_cmd_user_only(cmd) && - !compare_cmd(cmd->name, "info")) { - qlist_append_obj(cmd_list, get_cmd_dict(cmd->name)); - } + qlist_append_obj(cmd_list, get_cmd_dict(cmd->name)); } for (cmd = qmp_query_cmds; cmd->name != NULL; cmd++) { - if (monitor_handler_ported(cmd) && !monitor_cmd_user_only(cmd)) { - char buf[128]; - snprintf(buf, sizeof(buf), "query-%s", cmd->name); - qlist_append_obj(cmd_list, get_cmd_dict(buf)); - } + char buf[128]; + snprintf(buf, sizeof(buf), "query-%s", cmd->name); + qlist_append_obj(cmd_list, get_cmd_dict(buf)); } *ret_data = QOBJECT(cmd_list); -- 1.7.3.rc2.dirty