提交 d038317c 编写于 作者: W Wenchao Xia 提交者: Luiz Capitulino

monitor: call sortcmdlist() only one time

It doesn't need to be done for every monitor, so change it.
Signed-off-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 d1a9756a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册