diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2021-11-27 21:02:54 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-11 15:10:42 -0800 |
commit | 62ddd7613c8337bb5b7b77a4724abd4e0b0af1d1 (patch) | |
tree | 7fab44dfb5661732e5f39e3c4b1c8b829a29c409 /Userland/Utilities | |
parent | 65f4d868e58380fb9af740fccef434fa26beaded (diff) | |
download | serenity-62ddd7613c8337bb5b7b77a4724abd4e0b0af1d1.zip |
config: Port to LibMain :^)
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Userland/Utilities/config.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index 48aa357009..6c38e6d9af 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -70,7 +70,7 @@ target_link_libraries(chres LibGUI LibMain) target_link_libraries(cksum LibCrypto LibMain) target_link_libraries(clear LibMain) target_link_libraries(comm LibMain) -target_link_libraries(config LibConfig) +target_link_libraries(config LibConfig LibMain) target_link_libraries(copy LibGUI LibMain) target_link_libraries(cp LibMain) target_link_libraries(cpp-lexer LibMain) diff --git a/Userland/Utilities/config.cpp b/Userland/Utilities/config.cpp index 881c6e9035..128af34b64 100644 --- a/Userland/Utilities/config.cpp +++ b/Userland/Utilities/config.cpp @@ -7,8 +7,9 @@ #include <LibConfig/Client.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> +#include <LibMain/Main.h> -int main(int argc, char** argv) +ErrorOr<int> serenity_main(Main::Arguments arguments) { Core::EventLoop loop; String domain; @@ -24,7 +25,7 @@ int main(int argc, char** argv) args_parser.add_positional_argument(group, "Group name", "group"); args_parser.add_positional_argument(key, "Key name", "key"); args_parser.add_positional_argument(value_to_write, "Value to write", "value", Core::ArgsParser::Required::No); - args_parser.parse(argc, argv); + args_parser.parse(arguments); if (remove_key) { Config::remove_key(domain, group, key); |