diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-08-12 21:41:11 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-13 11:08:11 +0200 |
commit | 5121e58d4a67e0d0a075501a60f6466798754f5a (patch) | |
tree | 57b24c1fbfbb616710afd2041038eac36f64311a /Kernel/Syscalls | |
parent | 1ee1ef51033229282dfbf40bdbfaa6bbf72948f6 (diff) | |
download | serenity-5121e58d4a67e0d0a075501a60f6466798754f5a.zip |
Kernel: Fix sys$dbgputstr(...) to take a char* instead of u8*
We always attempt to print this as a string, and it's defined as such in
LibC, so fix the signature to match.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/debug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/debug.cpp b/Kernel/Syscalls/debug.cpp index 7926da79bf..5f34084266 100644 --- a/Kernel/Syscalls/debug.cpp +++ b/Kernel/Syscalls/debug.cpp @@ -25,7 +25,7 @@ KResultOr<FlatPtr> Process::sys$dbgputch(u8 ch) return 0; } -KResultOr<FlatPtr> Process::sys$dbgputstr(Userspace<const u8*> characters, size_t size) +KResultOr<FlatPtr> Process::sys$dbgputstr(Userspace<const char*> characters, size_t size) { VERIFY_NO_PROCESS_BIG_LOCK(this); if (size == 0) @@ -39,7 +39,7 @@ KResultOr<FlatPtr> Process::sys$dbgputstr(Userspace<const u8*> characters, size_ return size; } - auto result = try_copy_kstring_from_user(reinterpret_cast<char const*>(characters.unsafe_userspace_ptr()), size); + auto result = try_copy_kstring_from_user(characters, size); if (result.is_error()) return result.error(); dbgputstr(result.value()->characters(), size); |