From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxai-0005St-Q0 for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:58:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIxad-0008KB-MZ for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:58:24 -0500 Received: from e06smtp08.uk.ibm.com ([195.75.94.104]:34116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxad-0008IQ-CW for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:58:19 -0500 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Jan 2016 11:58:16 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3EF4617D8056 for ; Tue, 12 Jan 2016 11:58:14 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0CBwC2g5308712 for ; Tue, 12 Jan 2016 11:58:12 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0CBwC02026337 for ; Tue, 12 Jan 2016 06:58:12 -0500 Date: Tue, 12 Jan 2016 12:58:10 +0100 From: Cornelia Huck Message-ID: <20160112125810.2d6cb9d2.cornelia.huck@de.ibm.com> In-Reply-To: <1452599056-27357-2-git-send-email-berrange@redhat.com> References: <1452599056-27357-1-git-send-email-berrange@redhat.com> <1452599056-27357-2-git-send-email-berrange@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 01/22] s390: use FILE instead of QEMUFile for creating text file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Amit Shah , Juan Quintela , qemu-devel@nongnu.org, "Jason J. Herne" , "Dr. David Alan Gilbert" On Tue, 12 Jan 2016 11:43:55 +0000 "Daniel P. Berrange" 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 > --- > 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?