qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends
Date: Wed, 23 Dec 2015 11:43:06 +0000	[thread overview]
Message-ID: <20151223114306.GI20028@redhat.com> (raw)
In-Reply-To: <567A86C1.7020907@redhat.com>

On Wed, Dec 23, 2015 at 12:34:25PM +0100, Paolo Bonzini wrote:
> 
> 
> On 22/12/2015 19:17, Daniel P. Berrange wrote:
> > +    if (common->has_logfile) {
> > +        int flags = O_WRONLY | O_CREAT;
> > +        if (!common->has_logappend ||
> > +            !common->logappend) {
> > +            flags |= O_TRUNC;
> > +        }
> 
> Should it use O_APPEND if logappend is absent or true, or perhaps
> always?  I can take care of the change myself.

Yes it should use O_APPEND in the other branch of the if,
that's a bug eric pointed out too. Basically same logic
as the recently added 'append' flag in qmp_chardev_open_file

> You are also missing a few qemu_chr_alloc calls outside qemu-char.c,
> which makes me wonder if it's better to add the new logic in
> qemu_chr_alloc itself.

Oh, yes, perhaps I should just pass ChardevCommon straight
into qemu_chr_alloc(). I'll look at that when doing the other
changes Eric suggested wrt to removing use of backend.u.data

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

      reply	other threads:[~2015-12-23 11:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 18:17 [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends Daniel P. Berrange
2015-12-22 18:45 ` Eric Blake
2015-12-23 11:24   ` Daniel P. Berrange
2015-12-23 15:41     ` Eric Blake
2015-12-22 19:07 ` Eric Blake
2015-12-23 11:32   ` Daniel P. Berrange
2015-12-23 15:45     ` Eric Blake
2015-12-23 11:34 ` Paolo Bonzini
2015-12-23 11:43   ` Daniel P. Berrange [this message]

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=20151223114306.GI20028@redhat.com \
    --to=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).