mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00:00
Services: Use new global variables at /sys/kernel/ directory
This commit is contained in:
parent
b579d9518c
commit
35c98a031a
11 changed files with 13 additions and 13 deletions
|
@ -177,7 +177,7 @@ void DHCPv4Client::try_discover_ifs()
|
|||
|
||||
ErrorOr<DHCPv4Client::Interfaces> DHCPv4Client::get_discoverable_interfaces()
|
||||
{
|
||||
auto file = TRY(Core::File::open("/proc/net/adapters", Core::OpenMode::ReadOnly));
|
||||
auto file = TRY(Core::File::open("/sys/kernel/net/adapters", Core::OpenMode::ReadOnly));
|
||||
|
||||
auto file_contents = file->read_all();
|
||||
auto json = JsonValue::from_string(file_contents);
|
||||
|
|
|
@ -21,7 +21,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
|||
TRY(Core::System::pledge("stdio unix inet cpath rpath"));
|
||||
Core::EventLoop event_loop;
|
||||
|
||||
TRY(Core::System::unveil("/proc/net/", "r"));
|
||||
TRY(Core::System::unveil("/sys/kernel/net/", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
auto client = TRY(DHCPv4Client::try_create(interfaces));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue