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>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Marcel Apfelbaum 2015-01-06 15:29:13 +02:00 committed by Alexander Graf
parent c760dbb9dc
commit 759bf45d81
2 changed files with 7 additions and 0 deletions

View File

@ -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,

View File

@ -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