aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h8
-rw-r--r--include/block/block_int.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 2dd6630..c5d9620 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,
diff --git a/include/block/block_int.h b/include/block/block_int.h
index d0dd93e..98936c9 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -380,8 +380,7 @@ struct BlockDriverState {
BlockDriverState *backing_hd;
BdrvChild *backing_child;
- BlockDriverState *file;
- BdrvChild *file_child;
+ BdrvChild *file;
NotifierList close_notifiers;