From f56267fc14f39f055bc287658fb5200e9cb40784 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 14 Oct 2013 14:13:40 +0000 Subject: [PATCH] kmodloader: respect global directory prefix in scan_module_folder() --- kmodloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmodloader.c b/kmodloader.c index 623a169..11af0ae 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -284,8 +284,8 @@ static int scan_module_folder(void) int j; uname(&ver); - path = alloca(sizeof(DEF_MOD_PATH "*.ko") + strlen(ver.release) + 1); - sprintf(path, DEF_MOD_PATH "*.ko", ver.release); + path = alloca(sizeof(DEF_MOD_PATH "*.ko") + strlen(prefix) + strlen(ver.release) + 1); + sprintf(path, "%s" DEF_MOD_PATH "*.ko", prefix, ver.release); if (glob(path, gl_flags, NULL, &gl) < 0) return -1; -- 2.30.2