kmodloader: respect global directory prefix in scan_module_folder()
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 14 Oct 2013 14:13:40 +0000 (14:13 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 14 Oct 2013 14:13:40 +0000 (14:13 +0000)
kmodloader.c

index 623a1697a452315c94795c70d199984ee81c04cf..11af0ae7c313023a039c765c64dfeb269c8fb98b 100644 (file)
@@ -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;