summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Utilities/CMakeLists.txt1
-rw-r--r--Userland/Utilities/purge.cpp5
2 files changed, 4 insertions, 2 deletions
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 <LibCore/ArgsParser.h>
+#include <LibMain/Main.h>
#include <serenity.h>
#include <stdio.h>
-int main(int argc, char** argv)
+ErrorOr<int> 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;