cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-Revert-qdev-Do-not-let-the-user-try-to-device_add-wh.patch

9ae3a8
From 54a8632d899d7a4fa6376c5f658c0da99e9e0b78 Mon Sep 17 00:00:00 2001
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
Date: Fri, 17 Jan 2014 17:07:52 +0100
9ae3a8
Subject: [PATCH 02/11] Revert "qdev: Do not let the user try to device_add when it cannot work"
9ae3a8
9ae3a8
RH-Author: Markus Armbruster <armbru@redhat.com>
9ae3a8
Message-id: <1389978479-30595-3-git-send-email-armbru@redhat.com>
9ae3a8
Patchwork-id: 56792
9ae3a8
O-Subject: [PATCH 7.0 qemu-kvm 2/9] Revert "qdev: Do not let the user try to device_add when it cannot work"
9ae3a8
Bugzilla: 669524
9ae3a8
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
9ae3a8
9ae3a8
This reverts commit de651299014ae67b110a2abbff4a9e544b215b2b.
9ae3a8
9ae3a8
This one is actually fine, but its non-trivial conflict resolution
9ae3a8
would cause many more conflicts in the next few patches.  I'm going to
9ae3a8
reapply the upstream commit in a place where it applies cleanly.
9ae3a8
9ae3a8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
---
9ae3a8
 qdev-monitor.c | 6 +++---
9ae3a8
 1 file changed, 3 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 qdev-monitor.c |    6 +++---
9ae3a8
 1 files changed, 3 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
diff --git a/qdev-monitor.c b/qdev-monitor.c
9ae3a8
index f78ff64..d187db5 100644
9ae3a8
--- a/qdev-monitor.c
9ae3a8
+++ b/qdev-monitor.c
9ae3a8
@@ -477,13 +477,13 @@ DeviceState *qdev_device_add(QemuOpts *opts)
9ae3a8
         }
9ae3a8
     }
9ae3a8
 
9ae3a8
-    k = DEVICE_CLASS(obj);
9ae3a8
-
9ae3a8
-    if (!k || k->cannot_instantiate_with_device_add_yet) {
9ae3a8
+    if (!obj) {
9ae3a8
         qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "device type");
9ae3a8
         return NULL;
9ae3a8
     }
9ae3a8
 
9ae3a8
+    k = DEVICE_CLASS(obj);
9ae3a8
+
9ae3a8
     /* find bus */
9ae3a8
     path = qemu_opt_get(opts, "bus");
9ae3a8
     if (path != NULL) {
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8