mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
dmesg: Port to Core::Stream
This commit is contained in:
parent
37d4e01fc4
commit
e08a42acd8
Notes:
sideshowbarker
2024-07-17 04:17:12 +09:00
Author: https://github.com/AtkinsSJ
Commit: e08a42acd8
Pull-request: https://github.com/SerenityOS/serenity/pull/15244
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/demostanis
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue