]> Git Repo - qemu.git/commitdiff
block/blkreplay: Remove protocol-related fields
authorFabiano Rosas <[email protected]>
Mon, 12 Mar 2018 22:07:52 +0000 (19:07 -0300)
committerKevin Wolf <[email protected]>
Mon, 26 Mar 2018 10:16:00 +0000 (12:16 +0200)
The blkreplay driver is not a protocol so it should implement bdrv_open
instead of bdrv_file_open and not provide a protocol_name.

Attempts to invoke this driver using protocol syntax
(i.e. blkreplay:<filename:options:...>) will now fail gracefully:

  $ qemu-img info blkreplay:foo
  qemu-img: Could not open 'blkreplay:foo': Unknown protocol 'blkreplay'

Signed-off-by: Fabiano Rosas <[email protected]>
Reviewed-by: Pavel Dovgalyuk <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/blkreplay.c

index 61e44a1949ed4ad34d3329c042310f9bcdc00866..fe5a9b4a984da6a94b56a99391d4950363855748 100755 (executable)
@@ -129,10 +129,9 @@ static int coroutine_fn blkreplay_co_flush(BlockDriverState *bs)
 
 static BlockDriver bdrv_blkreplay = {
     .format_name            = "blkreplay",
-    .protocol_name          = "blkreplay",
     .instance_size          = 0,
 
-    .bdrv_file_open         = blkreplay_open,
+    .bdrv_open              = blkreplay_open,
     .bdrv_close             = blkreplay_close,
     .bdrv_child_perm        = bdrv_filter_default_perms,
     .bdrv_getlength         = blkreplay_getlength,
This page took 0.02707 seconds and 4 git commands to generate.