From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxhW-00045j-K8 for qemu-devel@nongnu.org; Tue, 12 Jan 2016 07:05:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIxhQ-0001kx-JP for qemu-devel@nongnu.org; Tue, 12 Jan 2016 07:05:26 -0500 Received: from e06smtp09.uk.ibm.com ([195.75.94.105]:58785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxhQ-0001hD-9k for qemu-devel@nongnu.org; Tue, 12 Jan 2016 07:05:20 -0500 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Jan 2016 12:05:18 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5EAD01B08074 for ; Tue, 12 Jan 2016 12:05:16 +0000 (GMT) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0CC5FhB11665908 for ; Tue, 12 Jan 2016 12:05:15 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0CC5EFB020615 for ; Tue, 12 Jan 2016 07:05:15 -0500 Date: Tue, 12 Jan 2016 13:05:13 +0100 From: Cornelia Huck Message-ID: <20160112130513.59312419.cornelia.huck@de.ibm.com> In-Reply-To: <20160112120121.GC17626@redhat.com> References: <1452599056-27357-1-git-send-email-berrange@redhat.com> <1452599056-27357-2-git-send-email-berrange@redhat.com> <20160112125810.2d6cb9d2.cornelia.huck@de.ibm.com> <20160112120121.GC17626@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 12:01:21 +0000 "Daniel P. Berrange" wrote: > 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" 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? > > 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. Sounds good.