All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Chen Gang <gang.chen.5i5j@gmail.com>,
	Markus Armbruster <armbru@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	mjt@tls.msk.ru, aliguori@amazon.com
Cc: qemu-trivial@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH trivial] vl: Avoid to close stdout after finish 'writeconfig' option
Date: Mon, 21 Apr 2014 09:09:18 -0600	[thread overview]
Message-ID: <5355349E.6060601@redhat.com> (raw)
In-Reply-To: <5353B7F9.4060803@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]

On 04/20/2014 06:05 AM, Chen Gang wrote:
> After finish 'writeconfig' to stdout (with '-'), we want to copy/past
> the related information mannually, not for redirection ('readconfig'
> does not support '-').
> 
> So we can not close the stdout, or next options which may use stdout
> will not be displayed.

Grammar, and awkward to read.  May I suggest:

vl: avoid closing stdout with 'writeconfig'

'writeconfig' supports output to stdout (with '-'); when that happens,
we must not close stdout, or further command line options that also use
stdout will be impacted.  (Although 'writeconfig' was copied from
'readconfig', the latter does not have the problem because it does not
support reading from '-')

> 
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  vl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

With the improved commit message,

Reviewed-by: Eric Blake <eblake@redhat.com>


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-04-21 15:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-20 12:05 [Qemu-trivial] [PATCH trivial] vl: Avoid to close stdout after finish 'writeconfig' option Chen Gang
2014-04-21 15:09 ` Eric Blake [this message]
2014-04-22  1:00   ` [Qemu-trivial] [Qemu-devel] " Chen Gang
2014-04-22 16:06   ` Andreas Färber
2014-04-22 16:31     ` Eric Blake
2014-04-22 19:18       ` Peter Maydell
2014-04-22 19:45         ` [Qemu-trivial] commit log tips [was: [Qemu-devel] [PATCH trivial] vl: Avoid to close stdout after finish 'writeconfig' option] Eric Blake

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=5355349E.6060601@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=gang.chen.5i5j@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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.