ladybird/Userland/shutdown.cpp

18 lines
395 B
C++
Raw Normal View History

#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");
2019-06-22 13:47:08 +00:00
CArgsParserResult args = args_parser.parse(argc, argv);
if (args.is_present("n")) {
syscall(SC_halt);
return 0;
} else {
args_parser.print_usage();
return 0;
}
}