yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 92d723eb5a17c33f9b446f59ebc453c05614a6ac Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Sat, 2 Nov 2013 15:24:00 +0100
Subject: [PATCH 51/81] rhel: Make "ccid-card-emulated" device unavailable

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1383405840-6221-2-git-send-email-armbru@redhat.com>
Patchwork-id: 55273
O-Subject: [PATCH 7.0 qemu-kvm 1/1] rhel: Make "ccid-card-emulated" device unavailable
Bugzilla: 1001123
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>

From: Markus Armbruster <armbru@redhat.com>

We can't just --disable-smartcard-nss, because that also disables
libcacard.  Instead, make it unavailable with -device / device_add.
Suffices, because there's no other way to get it: the device model
defines no external symbols, and the driver name doesn't occur in code
outside the device model.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/usb/ccid-card-emulated.c | 2 ++
 1 file changed, 2 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/usb/ccid-card-emulated.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index aa913df..037a9ec 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -595,6 +595,8 @@ static void emulated_class_initfn(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     dc->desc = "emulated smartcard";
     dc->props = emulated_card_properties;
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo emulated_card_info = {
-- 
1.7.1