mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-11 15:17:32 +00:00
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>
This commit is contained in:
parent
d1a9756ab8
commit
d038317c35
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user