]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use separate descriptors in bhyve's stdio uart backend.
authormarkj <markj@FreeBSD.org>
Mon, 22 Apr 2019 13:57:52 +0000 (13:57 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 22 Apr 2019 13:57:52 +0000 (13:57 +0000)
commit5414643fc41a5f0cd0a6c74319e22c79748b833b
tree73c1e3a76641a19efc83cb45c61ef43434cdb536
parent0812c4d8ae57d86d6d21d289761dc30cf6a032f3
Use separate descriptors in bhyve's stdio uart backend.

bhyve was previously using stdin for both reading and writing to the
console, which made it difficult to redirect console output.  Use
stdin for reading and stdout for writing.  This makes it easier to use
bhyve as a backend for syzkaller.

As a side effect, the change fixes a minor bug which would cause bhyve
to fail with ENOTCAPABLE if configured to use nmdm for com1 and stdio
for com2.

bhyveload already uses separate descriptors, as does the bvmcons driver.

Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19788
usr.sbin/bhyve/uart_emul.c