]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 16 Oct 2023 22:17:48 +0000 (15:17 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 24 Oct 2023 18:58:15 +0000 (11:58 -0700)
commit506890a652aaf19f59da0a84be26e991f99372d9
treed442f99cf397242d1c9833c116853fb7d78b8aa3
parent0e0d2636d4b1d6ed9aabaf873461db6f330bc4b5
bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN

EPRINTLN handles newlines appropriately when stdout/stderr have been
reused as the backend for a serial port.

For bhyverun.c itself, the rule this attempts to follow is to use
regular fprintf/perror/warn/err prior to init_pci() (which is when
serial ports are configured) and to switch to EPRINTLN afterwards.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D42182

(cherry picked from commit b0936440b8fcee523c0b26fdbbef7c3b2b5098bf)
usr.sbin/bhyve/bhyverun.c
usr.sbin/bhyve/block_if.c
usr.sbin/bhyve/bootrom.c
usr.sbin/bhyve/e820.c
usr.sbin/bhyve/gdb.c
usr.sbin/bhyve/pci_ahci.c
usr.sbin/bhyve/pci_xhci.c
usr.sbin/bhyve/snapshot.c