From patchwork Fri Jun 28 18:17:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 255493 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 2D4762C0098 for ; Sat, 29 Jun 2013 04:18:29 +1000 (EST) Received: from localhost ([::1]:53466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsdFa-0000tv-TL for incoming@patchwork.ozlabs.org; Fri, 28 Jun 2013 14:18:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsdF2-0000qW-4v for qemu-devel@nongnu.org; Fri, 28 Jun 2013 14:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsdEz-00055w-QI for qemu-devel@nongnu.org; Fri, 28 Jun 2013 14:17:52 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:38252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsdEz-00055X-Hk; Fri, 28 Jun 2013 14:17:49 -0400 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id B793742BD0; Fri, 28 Jun 2013 22:17:48 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 1C04556C; Fri, 28 Jun 2013 22:17:48 +0400 (MSK) From: Michael Tokarev To: Anthony Liguori Date: Fri, 28 Jun 2013 22:17:35 +0400 Message-Id: <1372443465-22384-5-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372443465-22384-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1372443465-22384-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev , Gerd Hoffmann , qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 04/14] 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 From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev --- qemu-char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index a030e6b..a538217 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3493,7 +3493,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; } @@ -3544,7 +3544,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)) {