From 27d0bd757e63ecf36d4d3f68548dae07fa985881 Mon Sep 17 00:00:00 2001 Message-Id: <27d0bd757e63ecf36d4d3f68548dae07fa985881.1376408877.git.minovotn@redhat.com> In-Reply-To: <823d94e906b2aeecd2c60bc9f19ca8948a756f27.1376408877.git.minovotn@redhat.com> References: <823d94e906b2aeecd2c60bc9f19ca8948a756f27.1376408877.git.minovotn@redhat.com> From: Gerd Hoffmann Date: Tue, 30 Jul 2013 11:35:21 +0200 Subject: [PATCH 03/18] qemu-char: check optional fields using has_* RH-Author: Gerd Hoffmann Message-id: <1375184130-11076-4-git-send-email-kraxel@redhat.com> Patchwork-id: 52781 O-Subject: [RHEL-6.5 qemu-kvm PATCH 03/12] qemu-char: check optional fields using has_* Bugzilla: 676568 RH-Acked-by: Laszlo Ersek RH-Acked-by: Luiz Capitulino RH-Acked-by: Michael S. Tsirkin Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev (cherry picked from commit e859eda58501cd20a2e6988fb4acc1756bc4d278) --- qemu-char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Signed-off-by: Michal Novotny --- qemu-char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 08467fb..bd814fd 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3086,7 +3086,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; } @@ -3137,7 +3137,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.11.7