qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 33/37] hw/machine: added machine_usb wrapper


From: Alexander Graf
Subject: [Qemu-devel] [PULL 33/37] hw/machine: added machine_usb wrapper
Date: Wed, 7 Jan 2015 16:20:44 +0100

From: Marcel Apfelbaum <address@hidden>

Following QOM convention, object properties should
not be accessed directly.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
 hw/core/machine.c   | 5 +++++
 include/hw/boards.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index a0ae5f9..fbd91be 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -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,
diff --git a/include/hw/boards.h b/include/hw/boards.h
index e0a6790..3ddc449 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -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
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]