2007-07-05 16:02:19 +00:00
|
|
|
/*
|
|
|
|
* umount.c - umount filesystems
|
|
|
|
*
|
|
|
|
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
2007-07-05 16:02:14 +00:00
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <fs.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2011-12-21 13:18:57 +00:00
|
|
|
static int do_umount(int argc, char *argv[])
|
2007-07-05 16:02:14 +00:00
|
|
|
{
|
2009-10-17 10:44:19 +00:00
|
|
|
if (argc != 2)
|
|
|
|
return COMMAND_ERROR_USAGE;
|
2007-07-05 16:02:14 +00:00
|
|
|
|
2014-04-26 10:40:10 +00:00
|
|
|
return umount(argv[1]);
|
2007-07-05 16:02:14 +00:00
|
|
|
}
|
|
|
|
|
2008-04-04 09:46:55 +00:00
|
|
|
static const __maybe_unused char cmd_umount_help[] =
|
2007-07-05 16:02:14 +00:00
|
|
|
"Usage: umount <mountpoint>\n"
|
|
|
|
"umount a filesystem mounted on a specific mountpoint\n";
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
BAREBOX_CMD_START(umount)
|
2007-07-05 16:02:14 +00:00
|
|
|
.cmd = do_umount,
|
|
|
|
.usage = "umount a filesystem",
|
commands: group 'help' output
The old output of "help" was just producing a long list, that usually
scrolled of the screen (even on a X11 terminal). This list is more
compact, and also sorted by groups.
The old output format (plus grouping) is now available with 'help -v'.
Example:
Information commands:
?, devinfo, help, iomem, meminfo, version
Boot commands:
boot, bootm, go, loadb, loads, loadx, loady, saves, uimage
...
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-13 14:14:05 +00:00
|
|
|
BAREBOX_CMD_GROUP(CMD_GRP_PART)
|
2009-12-15 08:11:09 +00:00
|
|
|
BAREBOX_CMD_HELP(cmd_umount_help)
|
|
|
|
BAREBOX_CMD_END
|