diff --git a/blockdev.c b/blockdev.c index d8fb3399f5..057601dcf0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1395,7 +1395,8 @@ static void external_snapshot_action(TransactionAction *action, bdrv_drained_begin(state->old_bs); if (!bdrv_is_inserted(state->old_bs)) { - error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, device); + error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, + bdrv_get_device_or_node_name(state->old_bs)); return; }