summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--main.c2
-rw-r--r--proto-shell.c2
-rw-r--r--proto.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index fb6deed..f70db54 100644
--- a/main.c
+++ b/main.c
@@ -25,6 +25,7 @@
#include "system.h"
#include "interface.h"
#include "wireless.h"
+#include "proto.h"
unsigned int debug_mask = 0;
const char *main_path = DEFAULT_MAIN_PATH;
@@ -326,6 +327,7 @@ int main(int argc, char **argv)
return 1;
}
+ proto_shell_init();
wireless_init();
if (system_init()) {
diff --git a/proto-shell.c b/proto-shell.c
index 37859f4..9041045 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -769,7 +769,7 @@ proto_shell_add_handler(const char *script, const char *name, json_object *obj)
add_proto_handler(proto);
}
-static void __init proto_shell_init(void)
+void proto_shell_init(void)
{
proto_fd = netifd_open_subdir("proto");
if (proto_fd < 0)
diff --git a/proto.h b/proto.h
index 996196b..e402a91 100644
--- a/proto.h
+++ b/proto.h
@@ -73,5 +73,6 @@ unsigned int parse_netmask_string(const char *str, bool v6);
int proto_apply_static_ip_settings(struct interface *iface, struct blob_attr *attr);
int proto_apply_ip_settings(struct interface *iface, struct blob_attr *attr, bool ext);
void proto_dump_handlers(struct blob_buf *b);
+void proto_shell_init(void);
#endif