From 37c2ecece40d192fbcfa87120ec8f3d658d954b0 Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 20 Jul 2026 09:05:44 +0900 Subject: [PATCH] brush: route rb_dbg diagnostics to /scheme/debug instead of stderr Writing startup diagnostics to stderr interleaves with the interactive console on the live image; /scheme/debug reaches the serial log without disturbing the shell's tty. --- .../shells/brush/patches/brush-redox-runtime-and-input.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/recipes/shells/brush/patches/brush-redox-runtime-and-input.patch b/local/recipes/shells/brush/patches/brush-redox-runtime-and-input.patch index 3972ce3b37..274493fb64 100644 --- a/local/recipes/shells/brush/patches/brush-redox-runtime-and-input.patch +++ b/local/recipes/shells/brush/patches/brush-redox-runtime-and-input.patch @@ -78,8 +78,8 @@ index 15340ad..46774c3 100644 +#[doc(hidden)] +fn rb_dbg(m: &str) { + use std::io::Write; -+ let _ = std::io::stderr().write_all(m.as_bytes()); -+ let _ = std::io::stderr().flush(); ++ let df = std::fs::OpenOptions::new().write(true).open("/scheme/debug"); ++ if let Ok(mut df) = df { let _ = df.write_all(m.as_bytes()); } +} + /// Main entry point for the `brush` shell.