]> git.proxmox.com Git - mirror_qemu.git/commit
vl: make sure char-pty message displayed by moving setbuf to the beginning
authorWei Yang <richardw.yang@linux.intel.com>
Tue, 16 Jul 2019 07:21:27 +0000 (15:21 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Jul 2019 07:27:16 +0000 (09:27 +0200)
commit45d8bc3adedeceaf449d758aee1810bfbe6feff4
treece75e56b8eb77e76bc0afea571f5b33ca781c2c3
parent3cae16db021601b5437622f89a86d5c489799fb3
vl: make sure char-pty message displayed by moving setbuf to the beginning

Recently we found a behavior change after commit 6ade45f2ac93611
('char-pty: Print "char device redirected" message to stdout').

When we redirect output to a file, the message "char device redirected
to PTY_NAME (label LABEL)" would not be seen at the beginning of the
file. Instead, the message is displayed after QEMU quit. This will block
test automation.

The reason is this message is printed after we set line buffer mode. So
move this to the beginning.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vl.c