mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-11 17:00:37 +00:00
purge: Port to LibMain
This commit is contained in:
parent
fbceebb717
commit
575fcc42c3
Notes:
sideshowbarker
2024-07-17 16:57:18 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/575fcc42c3 Pull-request: https://github.com/SerenityOS/serenity/pull/13172 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/ldm5180
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue