2020-12-16 18:40:29 +03:00
|
|
|
/*
|
2022-01-09 08:16:27 +03:00
|
|
|
* Copyright (c) 2020-2022, the SerenityOS developers.
|
2020-12-16 18:40:29 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-12-16 18:40:29 +03:00
|
|
|
*/
|
|
|
|
|
2023-03-01 23:05:04 +03:00
|
|
|
#include <LibCore/ArgsParser.h>
|
2022-01-09 08:16:27 +03:00
|
|
|
#include <LibCore/System.h>
|
|
|
|
#include <LibMain/Main.h>
|
2020-12-16 18:40:29 +03:00
|
|
|
|
2023-03-01 23:05:04 +03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
2020-12-16 18:40:29 +03:00
|
|
|
{
|
2023-03-01 23:05:04 +03:00
|
|
|
Optional<size_t> tone;
|
|
|
|
Core::ArgsParser args_parser;
|
|
|
|
args_parser.add_option(tone, "Beep tone", "beep-tone", 'f', "Beep tone (frequency in Hz)");
|
|
|
|
args_parser.parse(arguments);
|
|
|
|
TRY(Core::System::beep(tone));
|
2020-12-16 18:40:29 +03:00
|
|
|
return 0;
|
|
|
|
}
|