Otherwise modules with long names, e.g. lttng (>32 chars) can't be loaded.
Signed-off-by: Sergiy Kibrik <sakib@darkstar.site>
#include <libubox/ulog.h>
#define DEF_MOD_PATH "/modules/%s/"
+/* duplicated from in-kernel include/linux/module.h */
+#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
enum {
SCANNED,
static char* get_module_name(char *path)
{
- static char name[33];
+ static char name[MODULE_NAME_LEN];
char *t;
strncpy(name, basename(path), sizeof(name) - 1);