summaryrefslogtreecommitdiff
path: root/Userland/Utilities/dmesg.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-09-14 11:57:31 +0100
committerLinus Groh <mail@linusgroh.de>2022-11-19 17:00:10 +0000
commite08a42acd8dfa5f1e838d44aeef7c2affbe4ccfe (patch)
treeb8af6a6f762bc0fbfd43d4755ca4177d0c7065a7 /Userland/Utilities/dmesg.cpp
parent37d4e01fc4299e85a0fa74169d9f5b17300392b3 (diff)
downloadserenity-e08a42acd8dfa5f1e838d44aeef7c2affbe4ccfe.zip
dmesg: Port to Core::Stream
Diffstat (limited to 'Userland/Utilities/dmesg.cpp')
-rw-r--r--Userland/Utilities/dmesg.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/dmesg.cpp b/Userland/Utilities/dmesg.cpp
index a2d53367fd..05181b3246 100644
--- a/Userland/Utilities/dmesg.cpp
+++ b/Userland/Utilities/dmesg.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <LibCore/File.h>
+#include <LibCore/Stream.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
@@ -14,8 +14,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::unveil("/sys/kernel/dmesg", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
- auto file = TRY(Core::File::open("/sys/kernel/dmesg", Core::OpenMode::ReadOnly));
- auto buffer = file->read_all();
+ auto file = TRY(Core::Stream::File::open("/sys/kernel/dmesg"sv, Core::Stream::OpenMode::Read));
+ auto buffer = TRY(file->read_all());
out("{}", StringView { buffer });
return 0;
}