diff options
author | Wenchao Xia <xiawenc@linux.vnet.ibm.com> | 2013-08-27 20:38:18 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-08-30 07:41:14 -0400 |
commit | d038317c357efef9d8d362e526c5f5071f505a04 (patch) | |
tree | 922e0c3ab2a3313e46cc9256854d11bd23b4b7b8 /monitor.c | |
parent | d1a9756ab8c2c2578cbcb325efffe0b0af916944 (diff) |
monitor: call sortcmdlist() only one time
It doesn't need to be done for every monitor, so change it.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -4763,6 +4763,7 @@ void monitor_init(CharDriverState *chr, int flags) if (is_first_init) { monitor_protocol_event_init(); + sortcmdlist(); is_first_init = 0; } @@ -4792,8 +4793,6 @@ void monitor_init(CharDriverState *chr, int flags) QLIST_INSERT_HEAD(&mon_list, mon, entry); if (!default_mon || (flags & MONITOR_IS_DEFAULT)) default_mon = mon; - - sortcmdlist(); } static void bdrv_password_cb(Monitor *mon, const char *password, void *opaque) |