s390: use FILE instead of QEMUFile for creating text file
commit1fd791f007821e2510899e60be0ddad3077120e3
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 27 Apr 2016 10:04:51 +0000 (27 11:04 +0100)
committerAmit Shah <amit.shah@redhat.com>
Thu, 26 May 2016 06:01:05 +0000 (26 11:31 +0530)
tree5b19850af9c32328f57e154cafba278b867844c1
parent287db79df8af8e31f18e262feb5e05103a09e4d4
s390: use FILE instead of QEMUFile for creating text file

The s390 skeys monitor command needs to write out a plain text
file. Currently it is using the QEMUFile class for this, but
work is ongoing to refactor QEMUFile and eliminate much code
related to it. The only feature qemu_fopen() gives over fopen()
is support for QEMU FD passing, but this can be achieved with
qemu_open() + fdopen() too. Switching to regular stdio FILE
APIs avoids the need to sprintf via an intermedia buffer which
slightly simplifies the code.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <1461751518-12128-2-git-send-email-berrange@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
hw/s390x/s390-skeys.c