diff --git a/util/module.c b/util/module.c index 8ddb0e18f5..c5392918cc 100644 --- a/util/module.c +++ b/util/module.c @@ -298,6 +298,19 @@ bool module_load_one(const char *prefix, const char *lib_name, bool mayfail) } if (!success) { + + /* notify user about extra package */ + const char *pkg = NULL; + if (!strcmp(prefix, "block-")) + pkg = "qemu-block-extra"; + else if (!strcmp(prefix, "ui-") + || !strcmp(prefix, "audio-") + || !strcmp(module_name, "virtio-gpu-gl")) + pkg = "qemu-system-gui"; + if (pkg) + fprintf(stderr, "qemu: module %s%s not found, do you want to install %s package?\n", + prefix, module_name, pkg); + g_hash_table_remove(loaded_modules, module_name); g_free(module_name); }