The way we get QMP commands registered is high tech:
* qapi-commands.py generates qmp_init_marshal() that does the actual work
* it also generates the magic to register it as a MODULE_INIT_QAPI
function, so it runs when someone calls
module_call_init(MODULE_INIT_QAPI)
* main() calls module_call_init()
QEMU needs to register a few non-qapified commands. Same high tech
works: monitor.c has its own qmp_init_marshal() along with the magic
to make it run in module_call_init(MODULE_INIT_QAPI).
QEMU also needs to unregister commands that are not wanted in this
build's configuration (commit
|
||
|---|---|---|
| .. | ||
| acl.h | ||
| atomic.h | ||
| base64.h | ||
| bcd.h | ||
| bitmap.h | ||
| bitops.h | ||
| bswap.h | ||
| buffer.h | ||
| compiler.h | ||
| config-file.h | ||
| coroutine.h | ||
| coroutine_int.h | ||
| crc32c.h | ||
| cutils.h | ||
| envlist.h | ||
| error-report.h | ||
| event_notifier.h | ||
| fifo8.h | ||
| fifo32.h | ||
| fprintf-fn.h | ||
| futex.h | ||
| hbitmap.h | ||
| help_option.h | ||
| host-utils.h | ||
| id.h | ||
| int128.h | ||
| iov.h | ||
| jhash.h | ||
| log.h | ||
| main-loop.h | ||
| memfd.h | ||
| mmap-alloc.h | ||
| module.h | ||
| notify.h | ||
| option.h | ||
| option_int.h | ||
| osdep.h | ||
| path.h | ||
| processor.h | ||
| qdist.h | ||
| qht.h | ||
| queue.h | ||
| range.h | ||
| ratelimit.h | ||
| rcu.h | ||
| rcu_queue.h | ||
| readline.h | ||
| seqlock.h | ||
| sockets.h | ||
| thread-posix.h | ||
| thread-win32.h | ||
| thread.h | ||
| throttle-options.h | ||
| throttle.h | ||
| timed-average.h | ||
| timer.h | ||
| typedefs.h | ||
| unicode.h | ||
| uri.h | ||
| uuid.h | ||
| xattr.h | ||