9
0
Fork 0

mount: Allow to mount all available partitions

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-09-29 11:53:28 +02:00
parent cd16227383
commit 869a6e1d0e
1 changed files with 7 additions and 1 deletions

View File

@ -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
/**