From b0dd708eca67794dc884c42c9d3e1430fb1495a4 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Fri, 28 Jan 2022 09:18:09 -0600 Subject: [PATCH] arm64/debug_console: Add basic functionality to puts call * Matches arm and riscv64 Change-Id: I88874df4da16f5019def0c0c79ca41f37a926c12 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4916 Reviewed-by: Reviewed-by: Alex von Gluck IV --- src/system/kernel/arch/arm64/arch_debug_console.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/system/kernel/arch/arm64/arch_debug_console.cpp b/src/system/kernel/arch/arm64/arch_debug_console.cpp index 39baf0e876..c1e841b75a 100644 --- a/src/system/kernel/arch/arm64/arch_debug_console.cpp +++ b/src/system/kernel/arch/arm64/arch_debug_console.cpp @@ -59,6 +59,15 @@ arch_debug_serial_putchar(const char c) void arch_debug_serial_puts(const char *s) { + while (*s != '\0') { + char ch = *s; + if (ch == '\n') { + arch_debug_serial_putchar('\r'); + arch_debug_serial_putchar('\n'); + } else if (ch != '\r') + arch_debug_serial_putchar(ch); + s++; + } }