]> git.ipfire.org Git - thirdparty/qemu.git/commit
char: drop data written to a disconnected pty
authorEd Swierk <eswierk@skyportsystems.com>
Tue, 31 Jan 2017 13:45:29 +0000 (05:45 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Feb 2017 13:06:55 +0000 (14:06 +0100)
commit1c64fdbc8177058802df205f5d7cd65edafa59a8
treeb610a6e7772694f175220badcc98ae55f9520199
parentf65e821262029ee30c6b228e80ddeb86acdf7ff0
char: drop data written to a disconnected pty

When a serial port writes data to a pty that's disconnected, drop the
data and return the length dropped. This avoids triggering pointless
retries in callers like the 16550A serial_xmit(), and causes
qemu_chr_fe_write() to write all data to the log file, rather than
logging only while a pty client like virsh console happens to be
connected.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Message-Id: <1485870329-79428-1-git-send-email-eswierk@skyportsystems.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-pty.c