From 0194749ac4131e1bed8e166c5d5cf541678ef204 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 17 Sep 2015 19:25:13 +0300 Subject: replay: replay blockers for devices Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162512.8676.11367.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- hw/bt/hci.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/bt/hci.c') diff --git a/hw/bt/hci.c b/hw/bt/hci.c index 6a88d49..2151d01 100644 --- a/hw/bt/hci.c +++ b/hw/bt/hci.c @@ -23,6 +23,8 @@ #include "hw/usb.h" #include "sysemu/bt.h" #include "hw/bt.h" +#include "qapi/qmp/qerror.h" +#include "sysemu/replay.h" struct bt_hci_s { uint8_t *(*evt_packet)(void *opaque); @@ -72,6 +74,8 @@ struct bt_hci_s { struct HCIInfo info; struct bt_device_s device; + + Error *replay_blocker; }; #define DEFAULT_RSSI_DBM 20 @@ -2189,6 +2193,9 @@ struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net) s->device.handle_destroy = bt_hci_destroy; + error_setg(&s->replay_blocker, QERR_REPLAY_NOT_SUPPORTED, "-bt hci"); + replay_add_blocker(s->replay_blocker); + return &s->info; } -- cgit v1.1