1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

Utilities: Use new global variables at /sys/kernel/ directory

This commit is contained in:
Liav A 2022-10-14 21:56:19 +03:00 committed by Andrew Kaster
parent 35c98a031a
commit 9d1ba0e6ad
21 changed files with 30 additions and 29 deletions

View file

@ -11,10 +11,10 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
TRY(Core::System::pledge("stdio rpath"));
TRY(Core::System::unveil("/proc/dmesg", "r"));
TRY(Core::System::unveil("/sys/kernel/dmesg", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
auto file = TRY(Core::File::open("/proc/dmesg", Core::OpenMode::ReadOnly));
auto file = TRY(Core::File::open("/sys/kernel/dmesg", Core::OpenMode::ReadOnly));
auto buffer = file->read_all();
out("{}", StringView { buffer });
return 0;