DIAG(ptyd): log pty.input line-discipline (icanon/vmin -> cooked/mosi) + slave read mosi state

This commit is contained in:
Red Bear OS
2026-07-18 17:29:33 +09:00
parent 8b605179eb
commit 4fdb81fa30
2 changed files with 21 additions and 0 deletions
+13
View File
@@ -246,6 +246,19 @@ impl Pty {
}
self.update();
if !buf.is_empty() {
let cc = self.termios.c_cc;
eprintln!(
"ptyd-diag: input {} bytes icanon={} echo={} vmin={} vtime={} -> cooked={} mosi={}",
buf.len(),
icanon,
echo,
cc[VMIN],
cc[VTIME],
self.cooked.len(),
self.mosi.len(),
);
}
}
pub fn output(&mut self, buf: &[u8]) {
+8
View File
@@ -51,6 +51,14 @@ impl Resource for PtySubTerm {
pty.update();
if !pty.mosi.is_empty() {
eprintln!(
"ptyd-diag: subterm read: mosi has {} packet(s), first len {}",
pty.mosi.len(),
pty.mosi.front().map(|p| p.len()).unwrap_or(0),
);
}
if let Some(packet) = pty.mosi.pop_front() {
let mut i = 0;