From 24ccfe7d353ceb0ee4f8d4967604585de92fc9d0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 27 Oct 2011 21:09:47 +0200 Subject: proto-shell: handle the "available" config flag --- proto-shell.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'proto-shell.c') diff --git a/proto-shell.c b/proto-shell.c index b40b456..51a6dac 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -25,6 +25,7 @@ struct proto_shell_handler { struct proto_handler proto; struct config_param_list config; char *config_buf; + bool init_available; char script_name[]; }; @@ -615,6 +616,10 @@ proto_shell_add_handler(const char *script, json_object *obj) if (tmp && json_object_get_boolean(tmp)) handler->proto.flags |= PROTO_FLAG_NODEV; + tmp = get_field(obj, "available", json_type_boolean); + if (tmp && json_object_get_boolean(tmp)) + handler->proto.flags |= PROTO_FLAG_INIT_AVAILABLE; + config = get_field(obj, "config", json_type_array); if (config) handler->config_buf = proto_shell_parse_config(&handler->config, config); -- cgit v1.2.1