Blob Blame History Raw
From a5d74cbfb850a57c04e03241eeeeef81dc8cbdfd Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Sat, 2 Nov 2013 15:24:00 +0100
Subject: 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>

diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index aa1c37a..17921a3 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -586,6 +586,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 = {