summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-03-01 15:37:45 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-13 15:16:20 +0000
commitecd186285954f74b5ffd7444dbdcdf6141858be5 (patch)
treeadd602c4064dd43f8874ff360398885328f19886 /Userland/DevTools
parenta3f73e7d85584412e2774870bc6538faaaf71001 (diff)
downloadserenity-ecd186285954f74b5ffd7444dbdcdf6141858be5.zip
AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted
No functional changes.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp2
-rw-r--r--Userland/DevTools/HackStudio/ProjectBuilder.cpp2
-rw-r--r--Userland/DevTools/SQLStudio/ScriptEditor.cpp2
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator.cpp4
-rw-r--r--Userland/DevTools/UserspaceEmulator/main.cpp12
5 files changed, 11 insertions, 11 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
index 4e7bf9ca81..ce5abf3884 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
@@ -1807,7 +1807,7 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_open_project_config
return maybe_error.release_error();
auto file = TRY(Core::File::open(absolute_config_file_path, Core::File::OpenMode::Write));
- TRY(file->write_entire_buffer(
+ TRY(file->write_until_depleted(
"{\n"
" \"build_command\": \"your build command here\",\n"
" \"run_command\": \"your run command here\"\n"
diff --git a/Userland/DevTools/HackStudio/ProjectBuilder.cpp b/Userland/DevTools/HackStudio/ProjectBuilder.cpp
index 5ec9544cc3..b18ee7a99e 100644
--- a/Userland/DevTools/HackStudio/ProjectBuilder.cpp
+++ b/Userland/DevTools/HackStudio/ProjectBuilder.cpp
@@ -135,7 +135,7 @@ ErrorOr<void> ProjectBuilder::initialize_build_directory()
MUST(Core::DeprecatedFile::remove(cmake_file_path, Core::DeprecatedFile::RecursionMode::Disallowed));
auto cmake_file = TRY(Core::File::open(cmake_file_path, Core::File::OpenMode::Write));
- TRY(cmake_file->write_entire_buffer(generate_cmake_file_content().bytes()));
+ TRY(cmake_file->write_until_depleted(generate_cmake_file_content().bytes()));
TRY(m_terminal->run_command(DeprecatedString::formatted("cmake -S {} -DHACKSTUDIO_BUILD=ON -DHACKSTUDIO_BUILD_CMAKE_FILE={}"
" -DENABLE_UNICODE_DATABASE_DOWNLOAD=OFF",
diff --git a/Userland/DevTools/SQLStudio/ScriptEditor.cpp b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
index 331ff35a59..2cf378e020 100644
--- a/Userland/DevTools/SQLStudio/ScriptEditor.cpp
+++ b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
@@ -42,7 +42,7 @@ static ErrorOr<void> save_text_to_file(StringView filename, DeprecatedString tex
auto file = TRY(Core::File::open(filename, Core::File::OpenMode::Write));
if (!text.is_empty())
- TRY(file->write_entire_buffer(text.bytes()));
+ TRY(file->write_until_depleted(text.bytes()));
return {};
}
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
index 93e0c41a1f..a0207c4acf 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp
+++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
@@ -509,7 +509,7 @@ void Emulator::emit_profile_sample(Stream& output)
builder.appendff(R"~(, {{"type": "sample", "pid": {}, "tid": {}, "timestamp": {}, "lost_samples": 0, "stack": [)~", getpid(), gettid(), tv.tv_sec * 1000 + tv.tv_usec / 1000);
builder.join(',', raw_backtrace());
builder.append("]}\n"sv);
- output.write_entire_buffer(builder.string_view().bytes()).release_value_but_fixme_should_propagate_errors();
+ output.write_until_depleted(builder.string_view().bytes()).release_value_but_fixme_should_propagate_errors();
}
void Emulator::emit_profile_event(Stream& output, StringView event_name, DeprecatedString const& contents)
@@ -519,7 +519,7 @@ void Emulator::emit_profile_event(Stream& output, StringView event_name, Depreca
gettimeofday(&tv, nullptr);
builder.appendff(R"~(, {{"type": "{}", "pid": {}, "tid": {}, "timestamp": {}, "lost_samples": 0, "stack": [], {}}})~", event_name, getpid(), gettid(), tv.tv_sec * 1000 + tv.tv_usec / 1000, contents);
builder.append('\n');
- output.write_entire_buffer(builder.string_view().bytes()).release_value_but_fixme_should_propagate_errors();
+ output.write_until_depleted(builder.string_view().bytes()).release_value_but_fixme_should_propagate_errors();
}
DeprecatedString Emulator::create_instruction_line(FlatPtr address, X86::Instruction const& insn)
diff --git a/Userland/DevTools/UserspaceEmulator/main.cpp b/Userland/DevTools/UserspaceEmulator/main.cpp
index 83498e66e9..18796d1333 100644
--- a/Userland/DevTools/UserspaceEmulator/main.cpp
+++ b/Userland/DevTools/UserspaceEmulator/main.cpp
@@ -70,10 +70,10 @@ int main(int argc, char** argv, char** env)
profile_strings = make<Vector<NonnullOwnPtr<DeprecatedString>>>();
profile_string_id_map = make<Vector<int>>();
- profile_stream->write_entire_buffer(R"({"events":[)"sv.bytes()).release_value_but_fixme_should_propagate_errors();
+ profile_stream->write_until_depleted(R"({"events":[)"sv.bytes()).release_value_but_fixme_should_propagate_errors();
timeval tv {};
gettimeofday(&tv, nullptr);
- profile_stream->write_entire_buffer(
+ profile_stream->write_until_depleted(
DeprecatedString::formatted(
R"~({{"type": "process_create", "parent_pid": 1, "executable": "{}", "pid": {}, "tid": {}, "timestamp": {}, "lost_samples": 0, "stack": []}})~",
executable_path, getpid(), gettid(), tv.tv_sec * 1000 + tv.tv_usec / 1000)
@@ -109,13 +109,13 @@ int main(int argc, char** argv, char** env)
int rc = emulator.exec();
if (dump_profile) {
- emulator.profile_stream().write_entire_buffer("], \"strings\": ["sv.bytes()).release_value_but_fixme_should_propagate_errors();
+ emulator.profile_stream().write_until_depleted("], \"strings\": ["sv.bytes()).release_value_but_fixme_should_propagate_errors();
if (emulator.profiler_strings().size()) {
for (size_t i = 0; i < emulator.profiler_strings().size() - 1; ++i)
- emulator.profile_stream().write_entire_buffer(DeprecatedString::formatted("\"{}\", ", emulator.profiler_strings().at(i)).bytes()).release_value_but_fixme_should_propagate_errors();
- emulator.profile_stream().write_entire_buffer(DeprecatedString::formatted("\"{}\"", emulator.profiler_strings().last()).bytes()).release_value_but_fixme_should_propagate_errors();
+ emulator.profile_stream().write_until_depleted(DeprecatedString::formatted("\"{}\", ", emulator.profiler_strings().at(i)).bytes()).release_value_but_fixme_should_propagate_errors();
+ emulator.profile_stream().write_until_depleted(DeprecatedString::formatted("\"{}\"", emulator.profiler_strings().last()).bytes()).release_value_but_fixme_should_propagate_errors();
}
- emulator.profile_stream().write_entire_buffer("]}"sv.bytes()).release_value_but_fixme_should_propagate_errors();
+ emulator.profile_stream().write_until_depleted("]}"sv.bytes()).release_value_but_fixme_should_propagate_errors();
}
return rc;
}