[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/22] qapi: add QAPI module type
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 12/22] qapi: add QAPI module type |
Date: |
Sun, 6 Mar 2011 19:22:54 -0600 |
This lets us register marshaling handlers using a module init function.
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/module.h b/module.h
index 9263f1c..ef66730 100644
--- a/module.h
+++ b/module.h
@@ -24,12 +24,14 @@ typedef enum {
MODULE_INIT_BLOCK,
MODULE_INIT_DEVICE,
MODULE_INIT_MACHINE,
+ MODULE_INIT_QAPI,
MODULE_INIT_MAX
} module_init_type;
#define block_init(function) module_init(function, MODULE_INIT_BLOCK)
#define device_init(function) module_init(function, MODULE_INIT_DEVICE)
#define machine_init(function) module_init(function, MODULE_INIT_MACHINE)
+#define qapi_init(function) module_init(function, MODULE_INIT_QAPI)
void register_module_init(void (*fn)(void), module_init_type type);
diff --git a/vl.c b/vl.c
index b436952..68c6715 100644
--- a/vl.c
+++ b/vl.c
@@ -1966,6 +1966,8 @@ int main(int argc, char **argv, char **envp)
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
+ module_call_init(MODULE_INIT_QAPI);
+
for (i = 0; i < MAX_NODES; i++) {
node_mem[i] = 0;
node_cpumask[i] = 0;
--
1.7.0.4
- Re: [Qemu-devel] [PATCH 03/22] qapi: add Error object, (continued)
[Qemu-devel] [PATCH 10/22] qapi: add core QMP server support, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 12/22] qapi: add QAPI module type,
Anthony Liguori <=
[Qemu-devel] [PATCH 06/22] qapi: add JSON parsing error message, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command marshaling, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 15/22] qapi: add new QMP server that uses CharDriverState, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Anthony Liguori, 2011/03/06