Revision 1cc2428c

b/hw/ccid.h
29 29
 */
30 30
struct CCIDCardInfo {
31 31
    DeviceInfo qdev;
32
    void (*print)(Monitor *mon, CCIDCardState *card, int indent);
33 32
    const uint8_t *(*get_atr)(CCIDCardState *card, uint32_t *len);
34 33
    void (*apdu_from_guest)(CCIDCardState *card,
35 34
                            const uint8_t *apdu,
b/hw/usb-ccid.c
1104 1104
        : &s->pending_answers[s->pending_answers_start % PENDING_ANSWERS_NUM];
1105 1105
}
1106 1106

  
1107
static void ccid_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent)
1108
{
1109
    CCIDCardState *card = DO_UPCAST(CCIDCardState, qdev, qdev);
1110
    CCIDCardInfo *info = DO_UPCAST(CCIDCardInfo, qdev, qdev->info);
1111

  
1112
    if (info->print) {
1113
        info->print(mon, card, indent);
1114
    }
1115
}
1116

  
1117 1107
static struct BusInfo ccid_bus_info = {
1118 1108
    .name = "ccid-bus",
1119 1109
    .size = sizeof(CCIDBus),
1120
    .print_dev = ccid_bus_dev_print,
1121 1110
    .props = (Property[]) {
1122 1111
        DEFINE_PROP_UINT32("slot", struct CCIDCardState, slot, 0),
1123 1112
        DEFINE_PROP_END_OF_LIST(),

Also available in: Unified diff