From: Jo-Philipp Wich Date: Mon, 14 Oct 2013 14:13:40 +0000 (+0000) Subject: kmodloader: respect global directory prefix in scan_module_folder() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f56267fc14f39f055bc287658fb5200e9cb40784;p=oweals%2Fubox.git kmodloader: respect global directory prefix in scan_module_folder() --- 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;