提交 759bf45d 编写于 作者: M Marcel Apfelbaum 提交者: Alexander Graf

hw/machine: added machine_usb wrapper

Following QOM convention, object properties should
not be accessed directly.
Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 c760dbb9
......@@ -398,6 +398,11 @@ static void machine_finalize(Object *obj)
g_free(ms->firmware);
}
bool machine_usb(MachineState *machine)
{
return machine->usb;
}
static const TypeInfo machine_info = {
.name = TYPE_MACHINE,
.parent = TYPE_OBJECT,
......
......@@ -65,6 +65,8 @@ int qemu_register_machine(QEMUMachine *m);
MachineClass *find_default_machine(void);
extern MachineState *current_machine;
bool machine_usb(MachineState *machine);
/**
* MachineClass:
* @qemu_machine: #QEMUMachine
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册