~ruther/guix-local

ref: 8b69e1f8006e8fd4908f4559c3e150d6b04cb34e guix-local/gnu/packages/patches/libvirt-respect-modules-path.patch -rw-r--r-- 614 bytes
8b69e1f8 — Mathieu Lirzin gnu: clojure-tools-logging: Update to 1.3.1. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Honor the LINUX_MODULE_DIRECTORY environment variable.

Upstream-status: N/A

--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1459,6 +1459,7 @@ virPCIDeviceFindBestVFIOVariant(virPCIDevice *dev,
     }
 
     uname(&unameInfo);
-    modulesAliasPath = g_strdup_printf("/lib/modules/%s/modules.alias", unameInfo.release);
+    char* modulepath = getenv("LINUX_MODULE_DIRECTORY");
+    modulesAliasPath = g_strdup_printf("%s/%s/modules.alias", modulepath ? modulepath : "/lib/modules", unameInfo.release);
     if (virFileReadAll(modulesAliasPath, 8 * 1024 * 1024, &modulesAliasContent) < 0)
         return -1;