summaryrefslogtreecommitdiff
path: root/kmodloader.c
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-01-14 01:00:31 +0800
committerFelix Fietkau <nbd@nbd.name>2017-01-15 18:52:14 +0100
commit46a4b5f70aef35f1da70a72400cd8f34083d7501 (patch)
tree60ebb3128d25e775907ce13430b0a147948f788d /kmodloader.c
parenteacc426152ded54312fd1440bf6558ff2b69851f (diff)
downloadubox-46a4b5f70aef35f1da70a72400cd8f34083d7501.tar.gz
kmodloader: log to kmsg when loading directories of modules
syslog may not be ready yet before PREINIT Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'kmodloader.c')
-rw-r--r--kmodloader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kmodloader.c b/kmodloader.c
index 9fe7d7f..b20de6e 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <syslog.h>
#include <libgen.h>
#include <glob.h>
#include <elf.h>
@@ -785,7 +784,7 @@ static int main_loader(int argc, char **argv)
return -1;
}
- syslog(LOG_INFO, "kmodloader: loading kernel modules from %s\n", path);
+ ULOG_INFO("loading kernel modules from %s\n", path);
if (glob(path, gl_flags, NULL, &gl) < 0)
goto out;
@@ -836,6 +835,8 @@ static int main_loader(int argc, char **argv)
avl_for_each_element(&modules, m, avl)
if ((m->state == PROBE) || (m->error))
ULOG_ERR("- %s - %d\n", m->name, deps_available(m, 1));
+ } else {
+ ULOG_INFO("done loading kernel modules from %s\n", path);
}
out:
@@ -881,5 +882,6 @@ int main(int argc, char **argv)
if (!strcmp(exec, "modprobe"))
return main_modprobe(argc, argv);
+ ulog_open(ULOG_KMSG, LOG_USER, "kmodloader");
return main_loader(argc, argv);
}