1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 03:55:07 +00:00
serenity/Userland/Services/ConfigServer/main.cpp
sin-ack 3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00

24 lines
745 B
C++

/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "ConnectionFromClient.h"
#include <LibCore/StandardPaths.h>
#include <LibCore/System.h>
#include <LibIPC/MultiServer.h>
#include <LibMain/Main.h>
ErrorOr<int> serenity_main(Main::Arguments)
{
TRY(Core::System::pledge("stdio accept rpath wpath cpath"));
TRY(Core::System::unveil(Core::StandardPaths::config_directory(), "rwc"sv));
TRY(Core::System::unveil(Core::StandardPaths::home_directory(), "rwc"sv));
TRY(Core::System::unveil(nullptr, nullptr));
Core::EventLoop event_loop;
auto server = TRY(IPC::MultiServer<ConfigServer::ConnectionFromClient>::try_create());
return event_loop.exec();
}