Date: Sun, 22 Aug 2021 15:16:25 +0300 Updated: Thu, 15 Dec 2022 14:23:16 +0300 From: Michael Tokarev Subject: Note missing module package name Debian ships different modules in different packages. By default qemu ignores the fact that it can not load a module, pretending this module never existed. Give a useful hint about the package where the module in question resides. This is a hack, but it makes qemu a bit more user-friendly. diff --git a/util/module.c b/util/module.c index 32e263163c..2f3e35f781 100644 --- a/util/module.c +++ b/util/module.c @@ -303,6 +303,20 @@ int module_load(const char *prefix, const char *name, Error **errp) } rv = 0; /* module not found */ + { /* notify user about extra package to install */ + 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); + } + out: if (rv <= 0) { g_hash_table_remove(loaded_modules, module_name);