~ruther/guix-local

ref: bc2e049af14cd9a25b9571e79f1c5e6c97c5f742 guix-local/gnu/packages/patches/libvirt-respect-modules-path.patch -rw-r--r-- 614 bytes
bc2e049a — Sharlatan Hellseher gnu: Remove python-nose-exclude. 7 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;