yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
218e99
From 99421ce09cafb7fccd0d3db0144210ba16f40718 Mon Sep 17 00:00:00 2001
218e99
From: Gerd Hoffmann <kraxel@redhat.com>
218e99
Date: Mon, 14 Oct 2013 13:35:12 +0200
218e99
Subject: [PATCH 05/18] qemu-char: check optional fields using has_*
218e99
218e99
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
218e99
Message-id: <1381757723-23134-5-git-send-email-kraxel@redhat.com>
218e99
Patchwork-id: 54850
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 04/15] qemu-char: check optional fields using has_*
218e99
Bugzilla: 922010
218e99
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
218e99
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
218e99
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
218e99
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
218e99
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
218e99
(cherry picked from commit e859eda58501cd20a2e6988fb4acc1756bc4d278)
218e99
---
218e99
 qemu-char.c | 4 ++--
218e99
 1 file changed, 2 insertions(+), 2 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 qemu-char.c |    4 ++--
218e99
 1 files changed, 2 insertions(+), 2 deletions(-)
218e99
218e99
diff --git a/qemu-char.c b/qemu-char.c
218e99
index 660d758..ddc3dca 100644
218e99
--- a/qemu-char.c
218e99
+++ b/qemu-char.c
218e99
@@ -3521,7 +3521,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp)
218e99
 {
218e99
     HANDLE out;
218e99
 
218e99
-    if (file->in) {
218e99
+    if (file->has_in) {
218e99
         error_setg(errp, "input file not supported");
218e99
         return NULL;
218e99
     }
218e99
@@ -3572,7 +3572,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp)
218e99
         return NULL;
218e99
     }
218e99
 
218e99
-    if (file->in) {
218e99
+    if (file->has_in) {
218e99
         flags = O_RDONLY;
218e99
         in = qmp_chardev_open_file_source(file->in, flags, errp);
218e99
         if (error_is_set(errp)) {
218e99
-- 
218e99
1.7.1
218e99