summaryrefslogtreecommitdiff
path: root/Userland/Services/NetworkServer
diff options
context:
space:
mode:
authorhuttongrabiel <huttonthomas@icloud.com>2022-08-21 10:46:52 -0700
committerLinus Groh <mail@linusgroh.de>2022-08-23 13:37:21 +0100
commit4806567f053166952da4f191792fc8aab21a3a84 (patch)
tree2c8f70e711977b90c4985463cfa2c39f751ef49e /Userland/Services/NetworkServer
parent4e9313fa73f0760ec635e8259aa753e633c036e2 (diff)
downloadserenity-4806567f053166952da4f191792fc8aab21a3a84.zip
NetworkServer: Use Core::Stream instead of Core::File
As per the FIXME.
Diffstat (limited to 'Userland/Services/NetworkServer')
-rw-r--r--Userland/Services/NetworkServer/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Services/NetworkServer/main.cpp b/Userland/Services/NetworkServer/main.cpp
index e9d21a02e7..1d39b656a4 100644
--- a/Userland/Services/NetworkServer/main.cpp
+++ b/Userland/Services/NetworkServer/main.cpp
@@ -28,9 +28,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
auto config_file = TRY(Core::ConfigFile::open_for_system("Network"));
- // FIXME: Port this to Core::Stream when it gets read_all.
- auto proc_net_adapters_file = TRY(Core::File::open("/proc/net/adapters"sv, Core::OpenMode::ReadOnly));
- auto data = proc_net_adapters_file->read_all();
+ auto proc_net_adapters_file = TRY(Core::Stream::File::open("/proc/net/adapters"sv, Core::Stream::OpenMode::Read));
+ auto data = TRY(proc_net_adapters_file->read_all());
JsonParser parser(data);
JsonValue proc_net_adapters_json = TRY(parser.parse());