| // Copyright 2026 The Fuchsia Authors | |
| // | |
| // Use of this source code is governed by a MIT-style | |
| // license that can be found in the LICENSE file or at | |
| // https://opensource.org/licenses/MIT | |
| #include <lib/debuglog.h> | |
| #include <phys/handoff/boot-constants.h> | |
| extern "C" { | |
| void rust_dlog_init_early(); | |
| zx_status_t rust_dlog_write(uint32_t severity, uint32_t flags, const uint8_t* ptr, size_t len); | |
| void rust_dlog_bluescreen_init(); | |
| void rust_dlog_panic_start(); | |
| } // extern "C" | |
| void dlog_init_early() { rust_dlog_init_early(); } | |
| zx_status_t dlog_write(uint32_t severity, uint32_t flags, ktl::string_view str) { | |
| return rust_dlog_write(severity, flags, reinterpret_cast<const uint8_t*>(str.data()), str.size()); | |
| } | |
| void dlog_bluescreen_init() { rust_dlog_bluescreen_init(); } | |
| void dlog_panic_start() { rust_dlog_panic_start(); } | |
| bool dlog_bypass() { return kBootConstants.bypass_debuglog; } |