mirror of https://github.com/xemu-project/xemu.git
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) {
|
if (is_first_init) {
|
||||||
monitor_protocol_event_init();
|
monitor_protocol_event_init();
|
||||||
|
sortcmdlist();
|
||||||
is_first_init = 0;
|
is_first_init = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4792,8 +4793,6 @@ void monitor_init(CharDriverState *chr, int flags)
|
||||||
QLIST_INSERT_HEAD(&mon_list, mon, entry);
|
QLIST_INSERT_HEAD(&mon_list, mon, entry);
|
||||||
if (!default_mon || (flags & MONITOR_IS_DEFAULT))
|
if (!default_mon || (flags & MONITOR_IS_DEFAULT))
|
||||||
default_mon = mon;
|
default_mon = mon;
|
||||||
|
|
||||||
sortcmdlist();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bdrv_password_cb(Monitor *mon, const char *password, void *opaque)
|
static void bdrv_password_cb(Monitor *mon, const char *password, void *opaque)
|
||||||
|
|
Loading…
Reference in New Issue