mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:35:07 +00:00
Kernel: Remove char* versions of path argument / kstring copy methods
The only two paths for copying strings in the kernel should be going through the existing Userspace<char const*>, or StringArgument methods. Lets enforce this by removing the option for using the raw cstring APIs that were previously available.
This commit is contained in:
parent
5121e58d4a
commit
40a942d28b
6 changed files with 14 additions and 21 deletions
|
@ -498,7 +498,7 @@ Custody& Process::current_directory()
|
|||
return *m_cwd;
|
||||
}
|
||||
|
||||
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(char const* user_path, size_t path_length) const
|
||||
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<char const*> user_path, size_t path_length) const
|
||||
{
|
||||
if (path_length == 0)
|
||||
return EINVAL;
|
||||
|
@ -512,7 +512,8 @@ KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(char const*
|
|||
|
||||
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const
|
||||
{
|
||||
return get_syscall_path_argument(path.characters, path.length);
|
||||
Userspace<char const*> path_characters((FlatPtr)path.characters);
|
||||
return get_syscall_path_argument(path_characters, path.length);
|
||||
}
|
||||
|
||||
bool Process::dump_core()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue