From 99421ce09cafb7fccd0d3db0144210ba16f40718 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 14 Oct 2013 13:35:12 +0200
Subject: [PATCH 05/18] qemu-char: check optional fields using has_*
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <1381757723-23134-5-git-send-email-kraxel@redhat.com>
Patchwork-id: 54850
O-Subject: [RHEL-7 qemu-kvm PATCH 04/15] qemu-char: check optional fields using has_*
Bugzilla: 922010
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit e859eda58501cd20a2e6988fb4acc1756bc4d278)
---
qemu-char.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
qemu-char.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 660d758..ddc3dca 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3521,7 +3521,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;
}
@@ -3572,7 +3572,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.1