summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-11-01 18:04:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-11-02 17:55:17 +0100
commite1ea0bb4b22f19b29d814097e6e619069b6be049 (patch)
treefb0d8f8f31619d484ffb6bfa04378c1deb59c02f
parentd462c9edbb81f8abb1b72eec495da806108df090 (diff)
downloadbarebox-e1ea0bb4b22f19b29d814097e6e619069b6be049.tar.gz
barebox-e1ea0bb4b22f19b29d814097e6e619069b6be049.tar.xz
doc: unify documentation for 'setenv'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r--commands/setenv.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/commands/setenv.c b/commands/setenv.c
index 257348f80a..e39db20937 100644
--- a/commands/setenv.c
+++ b/commands/setenv.c
@@ -38,27 +38,23 @@ static int do_setenv(struct command *cmdtp, int argc, char *argv[])
return 0;
}
-static const __maybe_unused char cmd_setenv_help[] =
-"name value ...\n"
-" - set environment variable 'name' to 'value ...'\n"
-"setenv name\n"
-" - delete environment variable 'name'\n";
+BAREBOX_CMD_HELP_START(setenv)
+BAREBOX_CMD_HELP_USAGE("setenv <name> [<value>]\n")
+BAREBOX_CMD_HELP_SHORT("Set environment variable to a value or delete if value is avoided.\n")
+BAREBOX_CMD_HELP_END
+/**
+ * @page setenv_command
+
+<p> This command is only available if the simple command line parser is
+in use. Within the hush shell, \c setenv is not required.</p>
+
+\todo Check if kconfig does this correctly.
+
+ */
BAREBOX_CMD_START(setenv)
.cmd = do_setenv,
.usage = "set environment variables",
BAREBOX_CMD_HELP(cmd_setenv_help)
BAREBOX_CMD_END
-
-/**
- * @page setenv_command setenv: set an environment variable
- *
- * Usage: setenv \<name> [\<value>]
- *
- * Set environment variable \<name> to \<value>. Without a given value, the
- * environment variable will be deleted.
- *
- * @note This command is only available if the simple command line parser is
- * in use. Within the hush shell \c setenv is not required.
- */