From c3d9f24a392979cbd6a40d102c71eab018117f3e Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Tue, 17 Sep 2013 13:07:30 +0200 Subject: s390/eventfacility: allow childs to handle more than 1 event type Currently all handlers (quiesce, console) only handle one event type. Some drivers will handle multiple (compatible) event types. Rework the code accordingly. Signed-off-by: Christian Borntraeger Reviewed-by: Alexander Graf --- hw/s390x/sclpquiesce.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/s390x/sclpquiesce.c') diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index 6162678..a3c4bd6 100644 --- a/hw/s390x/sclpquiesce.c +++ b/hw/s390x/sclpquiesce.c @@ -22,9 +22,9 @@ typedef struct SignalQuiesce { uint8_t unit; } QEMU_PACKED SignalQuiesce; -static int event_type(void) +static bool can_handle_event(uint8_t type) { - return SCLP_EVENT_SIGNAL_QUIESCE; + return type == SCLP_EVENT_SIGNAL_QUIESCE; } static unsigned int send_mask(void) @@ -121,7 +121,7 @@ static void quiesce_class_init(ObjectClass *klass, void *data) k->get_send_mask = send_mask; k->get_receive_mask = receive_mask; - k->event_type = event_type; + k->can_handle_event = can_handle_event; k->read_event_data = read_event_data; k->write_event_data = NULL; } -- cgit v1.1