diff options
Diffstat (limited to 'arch/x86_64/src/debug/qemu_output.cpp')
| -rw-r--r-- | arch/x86_64/src/debug/qemu_output.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/src/debug/qemu_output.cpp b/arch/x86_64/src/debug/qemu_output.cpp index 773306f..0af5bdc 100644 --- a/arch/x86_64/src/debug/qemu_output.cpp +++ b/arch/x86_64/src/debug/qemu_output.cpp @@ -2,6 +2,7 @@ #include "kapi/cio.hpp" +#include <algorithm> #include <string_view> namespace teachos::debug::x86_64 @@ -9,15 +10,15 @@ namespace teachos::debug::x86_64 qemu_output::qemu_output(output_device & lower) : m_lower{lower} + , m_present{port::read() == port::address} {} auto qemu_output::write(cio::output_stream stream, std::string_view text) -> void { - for (auto c : text) + if (m_present) { - dbg::write(c); + std::ranges::for_each(text, port::write<port::value_type>); } - m_lower.write(stream, text); } |
