pwd: Convert to serenity_main(..)

This commit is contained in:
Brian Gianforcaro 2021-12-24 08:21:09 -08:00 committed by Brian Gianforcaro
parent a62669ebcf
commit 81c98502f3
Notes: sideshowbarker 2024-07-17 22:12:28 +09:00
2 changed files with 8 additions and 7 deletions

View file

@ -125,6 +125,7 @@ target_link_libraries(pls LibCrypt)
target_link_libraries(pmap LibMain)
target_link_libraries(pro LibProtocol)
target_link_libraries(ps LibMain)
target_link_libraries(pwd LibMain)
target_link_libraries(run-tests LibRegex)
target_link_libraries(shot LibGUI)
target_link_libraries(sql LibLine LibSQL LibIPC)

View file

@ -4,14 +4,14 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <AK/Format.h>
#include <AK/String.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
int main(int, char**)
ErrorOr<int> serenity_main(Main::Arguments)
{
char* cwd = getcwd(nullptr, 0);
puts(cwd);
free(cwd);
TRY(Core::System::pledge("stdio"));
outln(TRY(Core::System::getcwd()));
return 0;
}