On 12/13/18 6:21 AM, Wainer dos Santos Moschetta wrote:
On 12/12/2018 08:04 PM, Eric Blake wrote:
When a qemu-io command fails, it's best if the failure message
goes to stderr rather than stdout.
Reported-by: Richard W.M. Jones <rjo...@redhat.com>
Signed-off-by: Eric Blake <ebl...@redhat.com>
---
RFC because at least iotest 60 (found by -qcow2 -g quick) breaks due
to reordering of output lines, and I'd rather know if we like this
idea before bothering to revisit all affected iotests (including
discovering if other slower ones have similar problems).
if (!QEMU_IS_ALIGNED(count, BDRV_SECTOR_SIZE)) {
- printf("%"PRId64" is not a sector-aligned value for
'count'\n",
- count);
+ fprintf(stderr,
+ "%"PRId64" is not a sector-aligned value for
'count'\n",
Adding one space before and after PRId64 as in '"%" PRId64 " is not
(...)"' increases readability IMHO.
Pre-existing, but I don't mind fixing it while touching in the area.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org