From patchwork Mon Jun 24 06:39:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 253636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 884A02C0500 for ; Mon, 24 Jun 2013 16:40:41 +1000 (EST) Received: from localhost ([::1]:48096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0S7-0004OC-CS for incoming@patchwork.ozlabs.org; Mon, 24 Jun 2013 02:40:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0RV-0004Ay-RE for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:40:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur0RT-0006xi-0i for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:40:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0RS-0006xI-PP; Mon, 24 Jun 2013 02:39:58 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5O6dwgO011840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 Jun 2013 02:39:58 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5O6dv88025568; Mon, 24 Jun 2013 02:39:57 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id D302F416EE; Mon, 24 Jun 2013 08:39:56 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 24 Jun 2013 08:39:47 +0200 Message-Id: <1372055996-4072-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1372055996-4072-1-git-send-email-kraxel@redhat.com> References: <1372055996-4072-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org, Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 04/13] qemu-char: check optional fields using has_* X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- qemu-char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2c3cfe6..ee7c70e 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3500,7 +3500,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp) { HANDLE out; - if (file->in) { + if (file->has_in) { error_setg(errp, "input file not supported"); return NULL; } @@ -3551,7 +3551,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp) return NULL; } - if (file->in) { + if (file->has_in) { flags = O_RDONLY; in = qmp_chardev_open_file_source(file->in, flags, errp); if (error_is_set(errp)) {