summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/Process.cpp4
-rw-r--r--Kernel/Syscall.h8
-rw-r--r--Libraries/LibC/unistd.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 0430aba5d7..bdfb384b3c 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -932,9 +932,9 @@ int Process::sys$execve(const Syscall::SC_execve_params* user_params)
return true;
if (!validate_read_typed(list.strings, list.length))
return false;
- Vector<Syscall::SyscallString, 32> strings;
+ Vector<Syscall::StringArgument, 32> strings;
strings.resize(list.length);
- copy_from_user(strings.data(), list.strings, list.length * sizeof(Syscall::SyscallString));
+ copy_from_user(strings.data(), list.strings, list.length * sizeof(Syscall::StringArgument));
for (size_t i = 0; i < list.length; ++i) {
if (!validate_read(strings[i].characters, strings[i].length))
return false;
diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h
index 9396a97d5e..9193b917f7 100644
--- a/Kernel/Syscall.h
+++ b/Kernel/Syscall.h
@@ -300,7 +300,7 @@ struct SC_set_mmap_name_params {
size_t name_length;
};
-struct SyscallString {
+struct StringArgument {
const char* characters { nullptr };
size_t length { 0 };
};
@@ -312,18 +312,18 @@ struct MutableBufferArgument {
};
struct SyscallStringList {
- SyscallString* strings { nullptr };
+ StringArgument* strings { nullptr };
size_t length { 0 };
};
struct SC_execve_params {
- SyscallString path;
+ StringArgument path;
SyscallStringList arguments;
SyscallStringList environment;
};
struct SC_readlink_params {
- SyscallString path;
+ StringArgument path;
MutableBufferArgument<char, size_t> buffer;
};
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index 658291b478..8d63256b4a 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -67,8 +67,8 @@ int execve(const char* filename, char* const argv[], char* const envp[])
};
Syscall::SC_execve_params params;
- params.arguments.strings = (Syscall::SyscallString*)alloca(arg_count * sizeof(Syscall::SyscallString));
- params.environment.strings = (Syscall::SyscallString*)alloca(env_count * sizeof(Syscall::SyscallString));
+ params.arguments.strings = (Syscall::StringArgument*)alloca(arg_count * sizeof(Syscall::StringArgument));
+ params.environment.strings = (Syscall::StringArgument*)alloca(env_count * sizeof(Syscall::StringArgument));
params.path = { filename, strlen(filename) };
copy_strings(argv, arg_count, params.arguments);