diff options
author | Gerd Hoffmann | 2020-09-23 11:12:17 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2020-10-15 10:43:48 +0200 |
commit | 501093207eb1ed4845e0a65ee1ce7db7b9676e0b (patch) | |
tree | 52ab67735a1879280dd19403e73c4557b31ae323 /include/qemu | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/ui-20201014-pull-request' i... (diff) | |
download | qemu-501093207eb1ed4845e0a65ee1ce7db7b9676e0b.tar.gz qemu-501093207eb1ed4845e0a65ee1ce7db7b9676e0b.tar.xz qemu-501093207eb1ed4845e0a65ee1ce7db7b9676e0b.zip |
module: silence errors for module_load_qom_all().
Add mayfail bool parameter to module loading functions. Set it to true
for module_load_qom_all() because device modules might not load into all
system emulation variants. qemu-system-s390x for example will not load
qxl because it lacks vga support. Makes "make check" less chatty.
Drop module_loaded_qom_all check in module_load_qom_one to make sure we
see errors for explicit load requests, i.e. module_load_qom_one("qxl")
failing will log an error no matter whenever module_load_qom_all() was
called before or not.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20200923091217.22662-1-kraxel@redhat.com
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/module.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/qemu/module.h b/include/qemu/module.h index 9121a475c1..944d403cbd 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -61,15 +61,15 @@ typedef enum { #define fuzz_target_init(function) module_init(function, \ MODULE_INIT_FUZZ_TARGET) #define migration_init(function) module_init(function, MODULE_INIT_MIGRATION) -#define block_module_load_one(lib) module_load_one("block-", lib) -#define ui_module_load_one(lib) module_load_one("ui-", lib) -#define audio_module_load_one(lib) module_load_one("audio-", lib) +#define block_module_load_one(lib) module_load_one("block-", lib, false) +#define ui_module_load_one(lib) module_load_one("ui-", lib, false) +#define audio_module_load_one(lib) module_load_one("audio-", lib, false) void register_module_init(void (*fn)(void), module_init_type type); void register_dso_module_init(void (*fn)(void), module_init_type type); void module_call_init(module_init_type type); -bool module_load_one(const char *prefix, const char *lib_name); +bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); |