diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2023-04-26 19:28:59 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-27 07:29:49 +0200 |
commit | f92ae03e76fad20ad01ebc5c7f8fe207a2098c19 (patch) | |
tree | 95d4f200e4f9c44b17e82af33673cb9863144c73 | |
parent | d7ca3a51967ea0cd7cd97c42d2437a7b4fdb7900 (diff) | |
download | serenity-f92ae03e76fad20ad01ebc5c7f8fe207a2098c19.zip |
DHCPClient: Remove usage of `DeprecatedFile`
-rw-r--r-- | Userland/Services/DHCPClient/DHCPv4Client.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.cpp b/Userland/Services/DHCPClient/DHCPv4Client.cpp index 1573a81280..dc78032fd1 100644 --- a/Userland/Services/DHCPClient/DHCPv4Client.cpp +++ b/Userland/Services/DHCPClient/DHCPv4Client.cpp @@ -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()) { |