mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
system/vl: Filter machine list available for a particular target binary
Binaries can register a QOM type to filter their machines by filling their TargetInfo::machine_typename field. This can be used by example by main() -> machine_help_func() to filter the machines list. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
5e5a9aea79
commit
28502121be
5 changed files with 19 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "qemu/datadir.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/target-info.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/page-vary.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
|
@ -1564,7 +1565,7 @@ static void machine_help_func(const QDict *qdict)
|
|||
GSList *el;
|
||||
const char *type = qdict_get_try_str(qdict, "type");
|
||||
|
||||
machines = object_class_get_list(TYPE_MACHINE, false);
|
||||
machines = object_class_get_list(target_machine_typename(), false);
|
||||
if (type) {
|
||||
ObjectClass *machine_class = OBJECT_CLASS(find_machine(type, machines));
|
||||
if (machine_class) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue