summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-12-10 21:34:52 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-12-17 21:28:40 +0100
commit7d94f0e34830e6e202621d0c7e8088e004f4e1e2 (patch)
tree3502869dbfb9cfe845a61857d079d037b4fdc9d9
parent8e387d4e3e97d381c5898bd8a0b7c8f432a2273a (diff)
downloadbarebox-7d94f0e34830e6e202621d0c7e8088e004f4e1e2.tar.gz
barebox-7d94f0e34830e6e202621d0c7e8088e004f4e1e2.tar.xz
doc: add documentation for 'mkdir' command
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r--Documentation/commands.dox2
-rw-r--r--commands/mkdir.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index db3be1ae..45947e93 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -71,7 +71,7 @@ available in @a Barebox:
@li @subpage meminfo
@li @subpage memset
@li @subpage menu
-@li @subpage mkdir
+@li @subpage mkdir_command
@li @subpage mount_command
@li @subpage mtest
@li @subpage mw
diff --git a/commands/mkdir.c b/commands/mkdir.c
index b66795b6..9e377750 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -59,9 +59,19 @@ static int do_mkdir(struct command *cmdtp, int argc, char *argv[])
return 0;
}
-static const __maybe_unused char cmd_mkdir_help[] =
-"Usage: mkdir [directories]\n"
-"Create new directories\n";
+BAREBOX_CMD_HELP_START(mkdir)
+BAREBOX_CMD_HELP_USAGE("mkdir DIRECTORIES\n")
+BAREBOX_CMD_HELP_SHORT("Create new directories.\n")
+BAREBOX_CMD_HELP_OPT ("-p", "create all parent directories\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page mkdir_command
+
+When called with the '-p' option, mkdir creates all non-existing parent
+directories.
+
+ */
BAREBOX_CMD_START(mkdir)
.cmd = do_mkdir,