vmm: fix the initial flush while using PTY

Fix the condition to correctly identify a new PTY connection.

Fixes: 287887c99 (vmm: fix console IO safety)
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu
2025-11-26 11:45:45 -06:00
committed by Rob Bradford
parent ac5fc69b2e
commit ed4af3a005

View File

@@ -294,7 +294,7 @@ impl SerialManager {
}
};
if matches!(in_file, ConsoleOutput::Socket(_)) && num_events == 0 {
if matches!(in_file, ConsoleOutput::Pty(_)) && num_events == 0 {
// This very specific case happens when the serial is connected
// to a PTY. We know EPOLLHUP is always present when there's nothing
// connected at the other end of the PTY. That's why getting no event