DIAG(ptyd): log pty.input line-discipline (icanon/vmin -> cooked/mosi) + slave read mosi state
This commit is contained in:
@@ -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]) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user