On Tue, Jan 12, 2016 at 12:58:10PM +0100, Cornelia Huck wrote: > On Tue, 12 Jan 2016 11:43:55 +0000 > "Daniel P. Berrange" <berra...@redhat.com> wrote: > > > The s390 skeys monitor command needs to write out a plain text > > file. Currently it is using the QEMUFile class for this. There > > is no real benefit to this, and the downside is that it needs to > > snprintf via an intermediate buffer. Switching to regular FILE > > objects simplifies the code. > > > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > > --- > > hw/s390x/s390-skeys.c | 19 +++++++------------ > > 1 file changed, 7 insertions(+), 12 deletions(-) > > > @@ -124,7 +119,7 @@ void qmp_dump_skeys(const char *filename, Error **errp) > > return; > > } > > > > - f = qemu_fopen(filename, "wb"); > > + f = fopen(filename, "wb"); > > if (!f) { > > error_setg_file_open(errp, errno, filename); > > return; > > Hmm... > > https://marc.info/?l=qemu-devel&m=143740278908660&w=2 > > We'd lose the benefits from qemu_fopen() here again, or am I missing > something?
Oh, that message shouldn't really have recommended qemu_fopen() - it only needs qemu_open() to get the fd passing support. I'll change this to use qemu_open() + fdopen() instead, so we still support FD passing while using normal stdio. 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 :|