From 824a295d26a8a2ba02ae2a3821e4de89abbb81e9 Mon Sep 17 00:00:00 2001 From: Armin Luntzer <armin.luntzer@univie.ac.at> Date: Tue, 4 Apr 2017 13:38:05 +0200 Subject: [PATCH] SYSCTL: init on boot --- include/kernel/sysctl.h | 2 -- lib/sysctl.c | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/kernel/sysctl.h b/include/kernel/sysctl.h index 5b330f6..488dc2e 100644 --- a/include/kernel/sysctl.h +++ b/include/kernel/sysctl.h @@ -68,7 +68,5 @@ void sysset_show_tree(struct sysset *sysset); struct sysobj *sysset_find_obj(struct sysset *sysset, const char *path); -int32_t sysctl_init(void); - #endif diff --git a/lib/sysctl.c b/lib/sysctl.c index 34412d5..2a37eca 100644 --- a/lib/sysctl.c +++ b/lib/sysctl.c @@ -52,6 +52,8 @@ #include <kernel/export.h> #include <kernel/string.h> +#include <kernel/init.h> + #include <errno.h> #include <list.h> @@ -560,7 +562,7 @@ void sysset_show_tree(struct sysset *sysset) * @brief initalises sysctl */ -int32_t sysctl_init(void) +static int sysctl_init(void) { if (sys_set) return -1; @@ -577,3 +579,4 @@ int32_t sysctl_init(void) return 0; } +subsys_initcall(sysctl_init); -- GitLab