summaryrefslogtreecommitdiffstats
path: root/commands/mount.c
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-11-01 17:27:06 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-11-02 14:07:32 +0100
commit16337bc147e3733531b951999932223af371968d (patch)
tree9a208708b67e5e3d358f93ea7aeffea8b09a7ea2 /commands/mount.c
parenteff365e3949f58f49ea7c14682dd8c65a813b206 (diff)
downloadbarebox-16337bc147e3733531b951999932223af371968d.tar.gz
barebox-16337bc147e3733531b951999932223af371968d.tar.xz
doc: unify documentation for 'mount'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'commands/mount.c')
-rw-r--r--commands/mount.c78
1 files changed, 37 insertions, 41 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 8e4388ecd8..52d1700a78 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -58,49 +58,45 @@ static int do_mount(struct command *cmdtp, int argc, char *argv[])
return 0;
}
-static const __maybe_unused char cmd_mount_help[] =
-"Usage: mount: list mounted filesystems\n"
-"or: mount <device> <fstype> <mountpoint>\n"
-"\n"
-"Mount a filesystem of a given type to a mountpoint.\n"
-"<device> can be one of /dev/* or some arbitrary string if no\n"
-"device is needed for this driver (for example ramfs).\n"
-"<fstype> is the filesystem driver to use. Try the 'devinfo' command\n"
-"for a list of available drivers.\n"
-"<mountpoint> must be an empty directory descending directly from the\n"
-"root directory.\n";
+BAREBOX_CMD_HELP_START(mount)
+BAREBOX_CMD_HELP_USAGE("mount [<device> <fstype> <mountpoint>]\n")
+BAREBOX_CMD_HELP_SHORT("Mount a filesystem of a given type to a mountpoint.\n")
+BAREBOX_CMD_HELP_SHORT("If no argument is given, list mounted filesystems.\n")
+BAREBOX_CMD_HELP_END
-BAREBOX_CMD_START(mount)
- .cmd = do_mount,
- .usage = "mount a filesystem to a device",
- BAREBOX_CMD_HELP(cmd_mount_help)
-BAREBOX_CMD_END
+/**
+ * @page mount_command
+
+<ul>
+<li>\<device> can be a device in /dev or some arbitrary string if no
+ device is needed for this driver, i.e. on ramfs. </li>
+<li>\<fstype> is the filesystem driver. A list of available drivers can
+ be shown with the \ref devinfo_command command.</li>
+<li>\<mountpoint> must be an empty directory, one level below the /
+ directory.</li>
+</ul>
-/** @page mount_command mount
- * Usage: mount [\<device> \<fstype> \<mountpoint>]
- *
- * Mounts a filesystem of a given \<fstype> on a \<device> to a \<mountpoint>.
- * \<device> can be one of /dev/ * or some arbitrary string if no
- * device is needed for this driver (for example ramfs).
- *
- * \<fstype> is the filesystem driver to use. Try the 'devinfo' command
- * for a list of available drivers.
- *
- * \<mountpoint> must be an empty directory descending directly from the
- * root directory.
*/
-/** @page how_mount_works How mount works in barebox
- *
- * Mounting a filesystem ontop of a device is working like devices and drivers
- * are finding together.
- *
- * The mount command creates a new device with the filesystem name as the
- * driver for this "device". So the framework is able to merge both parts
- * together.
- *
- * By the way: With this feature its impossible to accidentely remove
- * partitions in use. A partition is internally also a device. If its mounted
- * it will be marked as busy, so an delpart command fails, until the filesystem
- * has been unmounted.
+/**
+ * @page how_mount_works How mount works in barebox
+
+Mounting a filesystem ontop of a device is working like devices and
+drivers are finding together.
+
+The mount command creates a new device with the filesystem name as the
+driver for this "device". So the framework is able to merge both parts
+together.
+
+By the way: With this feature its impossible to accidentely remove
+partitions in use. A partition is internally also a device. If its
+mounted it will be marked as busy, so an delpart command fails, until
+the filesystem has been unmounted.
+
*/
+
+BAREBOX_CMD_START(mount)
+ .cmd = do_mount,
+ .usage = "Mount a filesystem of a given type to a mountpoint or list mounted filesystems.",
+ BAREBOX_CMD_HELP(cmd_mount_help)
+BAREBOX_CMD_END