Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/nxinit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ comment "NXInit Service"

config SYSTEM_NXINIT_SERVICE_ARGS_MAX
int "Max number of service arguments"
default 8
default 16
range 3 64
---help---
Maximum number of service arguments,
Expand Down
17 changes: 17 additions & 0 deletions system/nxinit/builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ static int cmd_start(FAR struct action_manager_s *am,
int argc, FAR char **argv);
static int cmd_stop(FAR struct action_manager_s *am,
int argc, FAR char **argv);
#ifndef CONFIG_DISABLE_ENVIRON
static int cmd_set(FAR struct action_manager_s *am,
int argc, FAR char **argv);
#endif
#if CONFIG_SYSTEM_NXINIT_ACTION_EVENTS_MAX > 1
static int cmd_setprop(FAR struct action_manager_s *am,
int argc, FAR char **argv);
Expand Down Expand Up @@ -107,6 +111,9 @@ static const struct cmd_map_s g_builtin[] =
{"class_stop", 2, 2, cmd_class_stop},
{"exec", 3, 99, cmd_exec},
{"exec_start", 2, 2, cmd_exec_start},
#ifndef CONFIG_DISABLE_ENVIRON
{"set", 3, 3, cmd_set},
#endif
#if CONFIG_SYSTEM_NXINIT_ACTION_EVENTS_MAX > 1
{"setprop", 3, 3, cmd_setprop},
#endif
Expand Down Expand Up @@ -221,6 +228,16 @@ static int cmd_stop(FAR struct action_manager_s *am,
return init_service_stop(service);
}

#ifndef CONFIG_DISABLE_ENVIRON
static int cmd_set(FAR struct action_manager_s *am,
int argc, FAR char **argv)
{
UNUSED(am);
init_info("setenv '%s' '%s'", argv[1], argv[2]);
return setenv(argv[1], argv[2], 1);
}
#endif

#if CONFIG_SYSTEM_NXINIT_ACTION_EVENTS_MAX > 1
static int cmd_setprop(FAR struct action_manager_s *am, int argc,
FAR char **argv)
Expand Down
Loading