Revision c3d9f24a
b/hw/char/sclpconsole.c | ||
---|---|---|
79 | 79 |
|
80 | 80 |
/* functions to be called by event facility */ |
81 | 81 |
|
82 |
static int event_type(void)
|
|
82 |
static bool can_handle_event(uint8_t type)
|
|
83 | 83 |
{ |
84 |
return SCLP_EVENT_ASCII_CONSOLE_DATA; |
|
84 |
return type == SCLP_EVENT_ASCII_CONSOLE_DATA;
|
|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
static unsigned int send_mask(void) |
... | ... | |
272 | 272 |
ec->exit = console_exit; |
273 | 273 |
ec->get_send_mask = send_mask; |
274 | 274 |
ec->get_receive_mask = receive_mask; |
275 |
ec->event_type = event_type;
|
|
275 |
ec->can_handle_event = can_handle_event;
|
|
276 | 276 |
ec->read_event_data = read_event_data; |
277 | 277 |
ec->write_event_data = write_event_data; |
278 | 278 |
} |
b/hw/s390x/event-facility.c | ||
---|---|---|
120 | 120 |
ec = SCLP_EVENT_GET_CLASS(event); |
121 | 121 |
|
122 | 122 |
if (ec->write_event_data && |
123 |
ec->event_type() == event_buf->type) {
|
|
123 |
ec->can_handle_event(event_buf->type)) {
|
|
124 | 124 |
rc = ec->write_event_data(event, event_buf); |
125 | 125 |
break; |
126 | 126 |
} |
b/hw/s390x/sclpquiesce.c | ||
---|---|---|
22 | 22 |
uint8_t unit; |
23 | 23 |
} QEMU_PACKED SignalQuiesce; |
24 | 24 |
|
25 |
static int event_type(void)
|
|
25 |
static bool can_handle_event(uint8_t type)
|
|
26 | 26 |
{ |
27 |
return SCLP_EVENT_SIGNAL_QUIESCE; |
|
27 |
return type == SCLP_EVENT_SIGNAL_QUIESCE;
|
|
28 | 28 |
} |
29 | 29 |
|
30 | 30 |
static unsigned int send_mask(void) |
... | ... | |
121 | 121 |
|
122 | 122 |
k->get_send_mask = send_mask; |
123 | 123 |
k->get_receive_mask = receive_mask; |
124 |
k->event_type = event_type;
|
|
124 |
k->can_handle_event = can_handle_event;
|
|
125 | 125 |
k->read_event_data = read_event_data; |
126 | 126 |
k->write_event_data = NULL; |
127 | 127 |
} |
b/include/hw/s390x/event-facility.h | ||
---|---|---|
87 | 87 |
|
88 | 88 |
int (*write_event_data)(SCLPEvent *event, EventBufferHeader *evt_buf_hdr); |
89 | 89 |
|
90 |
/* returns the supported event type */ |
|
91 |
int (*event_type)(void); |
|
92 |
|
|
90 |
/* can we handle this event type? */ |
|
91 |
bool (*can_handle_event)(uint8_t type); |
|
93 | 92 |
} SCLPEventClass; |
94 | 93 |
|
95 | 94 |
#endif |
Also available in: Unified diff