summaryrefslogtreecommitdiffstats
path: root/commands/mount.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-09-29 11:53:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-30 16:03:02 +0200
commit869a6e1d0e11ff12aca2bdf679dc51a2a30da40e (patch)
tree13d1ddfb9614c8d78f93418362c00da8e8ae0a40 /commands/mount.c
parentcd1622738337b5564cc4d2b8f99832fb50bdeb06 (diff)
downloadbarebox-869a6e1d0e11ff12aca2bdf679dc51a2a30da40e.tar.gz
barebox-869a6e1d0e11ff12aca2bdf679dc51a2a30da40e.tar.xz
mount: Allow to mount all available partitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/mount.c')
-rw-r--r--commands/mount.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 203c4de530..96a4164519 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -37,7 +37,7 @@ static int do_mount(int argc, char *argv[])
const char *type = NULL;
const char *mountpoint, *dev;
- while ((opt = getopt(argc, argv, "t:v")) > 0) {
+ while ((opt = getopt(argc, argv, "t:va")) > 0) {
switch (opt) {
case 't':
type = optarg;
@@ -45,6 +45,9 @@ static int do_mount(int argc, char *argv[])
case 'v':
verbose++;
break;
+ case 'a':
+ mount_all();
+ break;
}
}
@@ -92,10 +95,13 @@ static int do_mount(int argc, char *argv[])
BAREBOX_CMD_HELP_START(mount)
BAREBOX_CMD_HELP_USAGE("mount [[OPTIONS] <device> <mountpoint>]\n")
BAREBOX_CMD_HELP_OPT("-t <type>", "specify filesystem type\n")
+BAREBOX_CMD_HELP_OPT("-a", "Mount all blockdevices.\n")
BAREBOX_CMD_HELP_OPT("-v", "be more verbose\n")
BAREBOX_CMD_HELP_SHORT("Mount a filesystem of a given type to a mountpoint.\n")
BAREBOX_CMD_HELP_SHORT("If no fstype is specified, try to detect it automatically.\n")
BAREBOX_CMD_HELP_SHORT("If no argument is given, list mounted filesystems.\n")
+BAREBOX_CMD_HELP_SHORT("With -a the mount command mounts all block devices whose filesystem\n")
+BAREBOX_CMD_HELP_SHORT("can be detected automatically to /mnt/<partname>\n")
BAREBOX_CMD_HELP_END
/**