From 575fcc42c3f70ffe7401f2addc51b1491a78a4c0 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Mon, 21 Mar 2022 00:42:34 -0700 Subject: purge: Port to LibMain --- Userland/Utilities/CMakeLists.txt | 1 + Userland/Utilities/purge.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Userland') diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index d6e612d8a9..8b6ac85288 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -166,6 +166,7 @@ target_link_libraries(printf LibMain) target_link_libraries(pro LibMain LibProtocol) target_link_libraries(profile LibMain) target_link_libraries(ps LibMain) +target_link_libraries(purge LibMain) target_link_libraries(pwd LibMain) target_link_libraries(realpath LibMain) target_link_libraries(reboot LibMain) diff --git a/Userland/Utilities/purge.cpp b/Userland/Utilities/purge.cpp index fcbefd4493..b7af6d34c9 100644 --- a/Userland/Utilities/purge.cpp +++ b/Userland/Utilities/purge.cpp @@ -5,10 +5,11 @@ */ #include +#include #include #include -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { int mode = 0; @@ -18,7 +19,7 @@ int main(int argc, char** argv) Core::ArgsParser args_parser; args_parser.add_option(purge_all_volatile, "Mode PURGE_ALL_VOLATILE", nullptr, 'v'); args_parser.add_option(purge_all_clean_inode, "Mode PURGE_ALL_CLEAN_INODE", nullptr, 'c'); - args_parser.parse(argc, argv); + args_parser.parse(arguments); if (!purge_all_volatile && !purge_all_clean_inode) purge_all_volatile = purge_all_clean_inode = true; -- cgit v1.2.3