mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
NetworkServer: Use Core::Stream instead of Core::File
As per the FIXME.
This commit is contained in:
parent
4e9313fa73
commit
4806567f05
Notes:
sideshowbarker
2024-07-17 08:01:37 +09:00
Author: https://github.com/huttongrabiel Commit: https://github.com/SerenityOS/serenity/commit/4806567f05 Pull-request: https://github.com/SerenityOS/serenity/pull/14962 Reviewed-by: https://github.com/sppmacd ✅
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user