diff options
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 2dd66300ed..c5d9620fa9 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -585,7 +585,13 @@ typedef enum { BLKDBG_EVENT_MAX, } BlkDebugEvent; -#define BLKDBG_EVENT(bs, evt) bdrv_debug_event(bs, evt) +#define BLKDBG_EVENT(child, evt) \ + do { \ + if (child) { \ + bdrv_debug_event(child->bs, evt); \ + } \ + } while (0) + void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event); int bdrv_debug_breakpoint(BlockDriverState *bs, const char *event, |