[OpenWrt-Devel] [PATCH] ubox: print an error when no kernel module dir can be found

Paul Fertser fercerpav at gmail.com
Wed Dec 18 11:39:42 EST 2019


Do not just silently fail when kernel modules are nowhere to be
found. This is essential for diagnosing mismatched kernel version
failures.

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 kmodloader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index 07b6700..b4facb4 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -108,8 +108,10 @@ static int init_module_folders(void)
 		s = p + 1;
 	}
 
-	if (!module_folders)
+	if (!module_folders) {
+		ULOG_ERR("no module folders for kernel version %s found\n", ver.release);
 		return -1;
+	}
 
 	module_folders[n] = NULL;
 	return 0;
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list