All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wainer dos Santos Moschetta <wainersm@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	rjones@redhat.com, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC] qemu-io: Prefer stderr for error messages
Date: Thu, 13 Dec 2018 08:04:53 -0600	[thread overview]
Message-ID: <391c955c-b347-5b65-7d78-d0287e2a787c@redhat.com> (raw)
In-Reply-To: <7936c6ef-7576-6004-5999-6af23cd88db9@redhat.com>

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 <rjones@redhat.com>
>> Signed-off-by: Eric Blake <eblake@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

  reply	other threads:[~2018-12-13 14:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 22:04 [Qemu-devel] [PATCH RFC] qemu-io: Prefer stderr for error messages Eric Blake
2018-12-12 22:11 ` Richard W.M. Jones
2018-12-12 23:52 ` [Qemu-devel] [Qemu-block] " Nir Soffer
2018-12-13  1:26   ` Eric Blake
2018-12-13 10:47   ` Daniel P. Berrangé
2018-12-13 14:05     ` Kevin Wolf
2018-12-13 14:23       ` Eric Blake
2018-12-13 14:34         ` Kevin Wolf
2018-12-13 17:44       ` Nir Soffer
2018-12-13 21:27         ` Eric Blake
2018-12-13 22:13           ` Nir Soffer
2018-12-13 17:15     ` Nir Soffer
2018-12-13 10:11 ` [Qemu-devel] " Daniel P. Berrangé
2018-12-13 14:22   ` Kevin Wolf
2018-12-13 16:02     ` Richard W.M. Jones
2018-12-13 12:21 ` Wainer dos Santos Moschetta
2018-12-13 14:04   ` Eric Blake [this message]
2018-12-13 14:38 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=391c955c-b347-5b65-7d78-d0287e2a787c@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.