~ruther/guix-local

ref: 64668f7c15fa639831209f25e313c99a1047de7b guix-local/gnu/packages/patches/libvirt-respect-modules-path.patch -rw-r--r-- 614 bytes
64668f7c — Rutherther etc: release: Add spare space to the release VM image. a month 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;