From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyjd-0005W1-UF for qemu-devel@nongnu.org; Fri, 21 Jun 2013 06:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upyjc-0007ig-2H for qemu-devel@nongnu.org; Fri, 21 Jun 2013 06:38:29 -0400 From: Gerd Hoffmann Date: Fri, 21 Jun 2013 12:38:16 +0200 Message-Id: <1371811105-730-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1371811105-730-1-git-send-email-kraxel@redhat.com> References: <1371811105-730-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 04/13] qemu-char: check optional fields using has_* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Anthony Liguori , Gerd Hoffmann 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)) { -- 1.7.9.7