~ruther/guix-local

ref: 56daf847a067b806f4e333c8849b387ea30df6e3 guix-local/gnu/packages/patches/libvirt-respect-modules-path.patch -rw-r--r-- 614 bytes
56daf847 — Christopher Baines gnu: nar-herder: Update to 0-44.3794b25. 5 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;