• E
    qemu-img: Flush stdout before before potential stderr messages · 4e2f4418
    Eric Blake 提交于
    During 'qemu-img create ... 2>&1', if --quiet is not in force, we can
    end up with buffered I/O in stdout that was produced before failure,
    but which appears in output after failure.  This is confusing; the fix
    is to flush stdout prior to attempting anything that might produce an
    error message.  Several iotests demonstrate the resulting ordering
    change now that the merged outputs now reflect chronology.  (An even
    better fix would be to avoid printf from within block.c altogether,
    but that's much more invasive...)
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Message-Id: <20200706203954.341758-2-eblake@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    4e2f4418
block.c 208.0 KB