hw/machine: added machine_usb wrapper
Following QOM convention, object properties should not be accessed directly. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-id: 1420550957-22337-3-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
f8b6f8edac
commit
5e97b623c2
|
@ -398,6 +398,11 @@ static void machine_finalize(Object *obj)
|
||||||
g_free(ms->firmware);
|
g_free(ms->firmware);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool machine_usb(MachineState *machine)
|
||||||
|
{
|
||||||
|
return machine->usb;
|
||||||
|
}
|
||||||
|
|
||||||
static const TypeInfo machine_info = {
|
static const TypeInfo machine_info = {
|
||||||
.name = TYPE_MACHINE,
|
.name = TYPE_MACHINE,
|
||||||
.parent = TYPE_OBJECT,
|
.parent = TYPE_OBJECT,
|
||||||
|
|
|
@ -65,6 +65,8 @@ int qemu_register_machine(QEMUMachine *m);
|
||||||
MachineClass *find_default_machine(void);
|
MachineClass *find_default_machine(void);
|
||||||
extern MachineState *current_machine;
|
extern MachineState *current_machine;
|
||||||
|
|
||||||
|
bool machine_usb(MachineState *machine);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MachineClass:
|
* MachineClass:
|
||||||
* @qemu_machine: #QEMUMachine
|
* @qemu_machine: #QEMUMachine
|
||||||
|
|
Loading…
Reference in a new issue