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 :|