mirror of https://gitee.com/openkylin/qemu.git
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. Gbp-Pq: Name note-missing-module-pkg-name.diff Signed-off-by: Cong Liu <liucong2@kylinos.cn>
This commit is contained in:
parent
59164a8de4
commit
62830bfba1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue