1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:17:34 +00:00

LibCore: Add const qualifier to exec() argument spans

This commit is contained in:
MacDue 2023-02-04 15:43:38 +00:00 committed by Andreas Kling
parent 1668d0da27
commit f4236e61bf
4 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@
#include <AK/String.h> #include <AK/String.h>
#include <QCoreApplication> #include <QCoreApplication>
ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arguments, Core::System::SearchInPath search_in_path, Optional<Span<StringView>> environment) ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arguments, Core::System::SearchInPath search_in_path, Optional<Span<StringView const>> environment)
{ {
auto paths = TRY(get_paths_for_helper_process(process_name)); auto paths = TRY(get_paths_for_helper_process(process_name));
VERIFY(!paths.is_empty()); VERIFY(!paths.is_empty());

View file

@ -14,5 +14,5 @@
#include <AK/StringView.h> #include <AK/StringView.h>
#include <LibCore/System.h> #include <LibCore/System.h>
ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arguments, Core::System::SearchInPath, Optional<Span<StringView>> environment = {}); ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arguments, Core::System::SearchInPath, Optional<Span<StringView const>> environment = {});
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name); ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name);

View file

@ -1113,7 +1113,7 @@ ErrorOr<u64> create_jail(StringView jail_name)
} }
#endif #endif
ErrorOr<void> exec(StringView filename, Span<StringView> arguments, SearchInPath search_in_path, Optional<Span<StringView>> environment) ErrorOr<void> exec(StringView filename, Span<StringView const> arguments, SearchInPath search_in_path, Optional<Span<StringView const>> environment)
{ {
#ifdef AK_OS_SERENITY #ifdef AK_OS_SERENITY
Syscall::SC_execve_params params; Syscall::SC_execve_params params;

View file

@ -178,7 +178,7 @@ enum class SearchInPath {
ErrorOr<void> exec_command(Vector<StringView>& command, bool preserve_env); ErrorOr<void> exec_command(Vector<StringView>& command, bool preserve_env);
#endif #endif
ErrorOr<void> exec(StringView filename, Span<StringView> arguments, SearchInPath, Optional<Span<StringView>> environment = {}); ErrorOr<void> exec(StringView filename, Span<StringView const> arguments, SearchInPath, Optional<Span<StringView const>> environment = {});
#ifdef AK_OS_SERENITY #ifdef AK_OS_SERENITY
ErrorOr<void> join_jail(u64 jail_index); ErrorOr<void> join_jail(u64 jail_index);