[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] qapi: Generate command registration stuff into separate
From: |
Eric Blake |
Subject: |
Re: [PATCH 3/6] qapi: Generate command registration stuff into separate files |
Date: |
Wed, 20 Nov 2019 13:26:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 11/20/19 12:25 PM, Markus Armbruster wrote:
Having to include qapi-commands.h just for qmp_init_marshal() is
suboptimal. Generate it into separate files. This lets
monitor/misc.c, qga/main.c, and the generated qapi-commands-FOO.h
include less.
Signed-off-by: Markus Armbruster <address@hidden>
---
+++ b/docs/devel/qapi-code-gen.txt
@@ -1493,6 +1493,10 @@ $(prefix)qapi-commands.c: Command marshal/dispatch
functions for each
$(prefix)qapi-commands.h: Function prototypes for the QMP commands
specified in the schema
+$(prefix)qapi-init-commands.h - Command initialization prototype
+
+$(prefix)qapi-init-commands.h - Command initialization code
Looks like you meant s/h/c/
+ #endif /* EXAMPLE_QAPI_INIT_COMMANDS_H */
+ $ cat qapi-generated/example-qapi-init-commands.
+[Uninteresting stuff omitted...]
missing a 'c'
+++ b/Makefile
-QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h)
+QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h
qga-qapi-commands.h qga-qapi-init-commands.h)
Worth using \ for line-wrapping?
With those addressed,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [PATCH 0/6] qapi: Module fixes and cleanups, Markus Armbruster, 2019/11/20
- [PATCH 4/6] qapi: Proper intermediate representation for modules, Markus Armbruster, 2019/11/20
- [PATCH 3/6] qapi: Generate command registration stuff into separate files, Markus Armbruster, 2019/11/20
- Re: [PATCH 3/6] qapi: Generate command registration stuff into separate files,
Eric Blake <=
- [PATCH 5/6] qapi: Fix code generation for empty modules, Markus Armbruster, 2019/11/20
- [PATCH 2/6] tests/Makefile.include: Fix missing test-qapi-emit-events.[ch], Markus Armbruster, 2019/11/20
- [PATCH 6/6] qapi: Simplify QAPISchemaModularCVisitor, Markus Armbruster, 2019/11/20
- [PATCH 1/6] qapi: Tweak "command returns a nice type" check for clarity, Markus Armbruster, 2019/11/20
- Re: [PATCH 0/6] qapi: Module fixes and cleanups, Markus Armbruster, 2019/11/20