mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
17 lines
395 B
C++
17 lines
395 B
C++
#include <Kernel/Syscall.h>
|
|
#include <LibCore/CArgsParser.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
CArgsParser args_parser("shutdown");
|
|
args_parser.add_arg("n", "shut down now");
|
|
CArgsParserResult args = args_parser.parse(argc, argv);
|
|
|
|
if (args.is_present("n")) {
|
|
syscall(SC_halt);
|
|
return 0;
|
|
} else {
|
|
args_parser.print_usage();
|
|
return 0;
|
|
}
|
|
}
|