mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
DHCPClient: Remove usage of DeprecatedFile
This commit is contained in:
parent
d7ca3a5196
commit
f92ae03e76
Notes:
sideshowbarker
2024-07-17 07:11:12 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/f92ae03e76 Pull-request: https://github.com/SerenityOS/serenity/pull/18526
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@
|
|||
#include <AK/Random.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/Try.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -179,9 +179,9 @@ void DHCPv4Client::try_discover_ifs()
|
|||
|
||||
ErrorOr<DHCPv4Client::Interfaces> DHCPv4Client::get_discoverable_interfaces()
|
||||
{
|
||||
auto file = TRY(Core::DeprecatedFile::open("/sys/kernel/net/adapters", Core::OpenMode::ReadOnly));
|
||||
auto file = TRY(Core::File::open("/sys/kernel/net/adapters"sv, Core::File::OpenMode::Read));
|
||||
|
||||
auto file_contents = file->read_all();
|
||||
auto file_contents = TRY(file->read_until_eof());
|
||||
auto json = JsonValue::from_string(file_contents);
|
||||
|
||||
if (json.is_error() || !json.value().is_array()) {
|
||||
|
|
Loading…
Reference in a new issue