The UART backend enables non-blocking mode on its read
and write file descriptors, and overrides their flags.
This leads to overwriting console log files that are supposed
to be appended. For example:
bhyve -l com1,stdio ... >> /path/to/cons.log
can overwrite the existing contents of "/path/to/cons.log"
instead of appending.
Fix by preserving the existing flags and adding O_NONBLOCK
to them.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation