mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
monitor: Loosen coupling between misc.c and monitor.c slightly
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-32-armbru@redhat.com>
This commit is contained in:
@ -135,7 +135,7 @@ compare_mon_cmd(const void *a, const void *b)
|
||||
((const HMPCommand *)b)->name);
|
||||
}
|
||||
|
||||
static void sortcmdlist(void)
|
||||
static void __attribute__((__constructor__)) sortcmdlist(void)
|
||||
{
|
||||
qsort(hmp_cmds, ARRAY_SIZE(hmp_cmds) - 1,
|
||||
sizeof(*hmp_cmds),
|
||||
@ -176,9 +176,3 @@ void monitor_register_hmp_info_hrt(const char *name,
|
||||
}
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
void monitor_init_globals(void)
|
||||
{
|
||||
monitor_init_globals_core();
|
||||
sortcmdlist();
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ static void monitor_qapi_event_init(void)
|
||||
qapi_event_throttle_equal);
|
||||
}
|
||||
|
||||
void monitor_init_globals_core(void)
|
||||
void monitor_init_globals(void)
|
||||
{
|
||||
monitor_qapi_event_init();
|
||||
qemu_mutex_init(&monitor_lock);
|
||||
|
Reference in New Issue
Block a user