Skip to contentSkip to conversation

Introduce a per-machine option set

PATCH In review Jan Kiszka 1 participant 1 message May 20, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 2/3 Introduce a per-machine option set

Simple patch to enable machine implementers to provide a machine-specific option set. It is automatically registered when the machine is registered.

---
 hw/boards.h |    1 +
 vl.c        |    2 ++
 2 files changed, 3 insertions(+)
hw/boards.h +1 -0
Index: b/hw/boards.h
===================================================================
@@ -16,6 +16,7 @@ typedef struct QEMUMachine {
     QEMUMachineInitFunc *init;
 #define RAMSIZE_FIXED	(1 << 0)
     ram_addr_t ram_require;
+    QEMUOptionSet *option_set;
     struct QEMUMachine *next;
 } QEMUMachine;
 
vl.c +2 -0
Index: b/vl.c
===================================================================
@@ -6748,6 +6748,8 @@ int qemu_register_machine(QEMUMachine *m
         pm = &(*pm)->next;
     m->next = NULL;
     *pm = m;
+    if (m->option_set)
+        qemu_register_option_set(m->option_set);
     return 0;
 }