diff --git a/block.c b/block.c index a2542c977b..6b984dc883 100644 --- a/block.c +++ b/block.c @@ -363,6 +363,7 @@ char *bdrv_get_full_backing_filename(BlockDriverState *bs, Error **errp) void bdrv_register(BlockDriver *bdrv) { + assert(bdrv->format_name); QLIST_INSERT_HEAD(&bdrv_drivers, bdrv, list); }