From 97ef1ac26034bcd48666a9b43b3ad82381931227 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 14 Sep 2022 17:01:17 +0100 Subject: [PATCH] pmap: Port to Core::Stream --- Userland/Utilities/pmap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Utilities/pmap.cpp b/Userland/Utilities/pmap.cpp index 20d41aebb0..09cbc74a5b 100644 --- a/Userland/Utilities/pmap.cpp +++ b/Userland/Utilities/pmap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -26,7 +26,7 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_positional_argument(pid, "PID", "PID", Core::ArgsParser::Required::Yes); args_parser.parse(arguments); - auto file = TRY(Core::File::open(String::formatted("/proc/{}/vm", pid), Core::OpenMode::ReadOnly)); + auto file = TRY(Core::Stream::File::open(String::formatted("/proc/{}/vm", pid), Core::Stream::OpenMode::Read)); outln("{}:", pid); @@ -42,7 +42,7 @@ ErrorOr serenity_main(Main::Arguments arguments) outln("Address{} Size Access Name", padding); } - auto file_contents = file->read_all(); + auto file_contents = TRY(file->read_all()); auto json = TRY(JsonValue::from_string(file_contents)); Vector sorted_regions = json.as_array().values();