ladybird/Userland/Utilities/umount.cpp

22 lines
501 B
C++
Raw Normal View History

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/ArgsParser.h>
2022-01-22 01:11:55 +03:00
#include <LibCore/System.h>
#include <LibMain/Main.h>
2022-01-22 01:11:55 +03:00
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
2022-01-22 01:11:55 +03:00
StringView mount_point;
Core::ArgsParser args_parser;
args_parser.add_positional_argument(mount_point, "Mount point", "mountpoint");
2022-01-22 01:11:55 +03:00
args_parser.parse(arguments);
2022-01-22 01:11:55 +03:00
TRY(Core::System::umount(mount_point));
return 0;
}