summaryrefslogtreecommitdiffstats
path: root/debian/patches/note-missing-module-pkg-name.diff
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2025-06-06 10:05:27 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2025-06-06 10:05:27 +0000
commit43904a02caeb311a505bbb5ffa431ea9859db5f4 (patch)
treecd841d75f639d9092243b0d02a3bb93cbdea5804 /debian/patches/note-missing-module-pkg-name.diff
parentAdding upstream version 1:7.2+dfsg. (diff)
downloadqemu-debian.tar.xz
qemu-debian.zip
Adding debian version 1:7.2+dfsg-7+deb12u13.debian/1%7.2+dfsg-7+deb12u13debian
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'debian/patches/note-missing-module-pkg-name.diff')
-rw-r--r--debian/patches/note-missing-module-pkg-name.diff38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/note-missing-module-pkg-name.diff b/debian/patches/note-missing-module-pkg-name.diff
new file mode 100644
index 00000000..eee95aa1
--- /dev/null
+++ b/debian/patches/note-missing-module-pkg-name.diff
@@ -0,0 +1,38 @@
+Date: Sun, 22 Aug 2021 15:16:25 +0300
+Updated: Thu, 15 Dec 2022 14:23:16 +0300
+From: Michael Tokarev <mjt@tls.msk.ru>
+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);