Skip to content

Commit

Permalink
block: Make more BlockDriver definitions static
Browse files Browse the repository at this point in the history
Most block driver implementations don't have any reason for their
BlockDriver to be public. The only exceptions are bdrv_file, bdrv_raw
and bdrv_qcow2, which are actually used in other source files.

Make all other BlockDriver definitions static if they aren't yet.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230905130607.35134-3-kwolf@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
kevmw committed Sep 8, 2023
1 parent 9e03a5e commit 9ea473f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion block/copy-before-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ static void cbw_close(BlockDriverState *bs)
s->bcs = NULL;
}

BlockDriver bdrv_cbw_filter = {
static BlockDriver bdrv_cbw_filter = {
.format_name = "copy-before-write",
.instance_size = sizeof(BDRVCopyBeforeWriteState),

Expand Down
2 changes: 1 addition & 1 deletion block/preallocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static void preallocate_child_perm(BlockDriverState *bs, BdrvChild *c,
}
}

BlockDriver bdrv_preallocate_filter = {
static BlockDriver bdrv_preallocate_filter = {
.format_name = "preallocate",
.instance_size = sizeof(BDRVPreallocateState),

Expand Down
2 changes: 1 addition & 1 deletion block/snapshot-access.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void snapshot_access_child_perm(BlockDriverState *bs, BdrvChild *c,
*nshared = BLK_PERM_ALL;
}

BlockDriver bdrv_snapshot_access_drv = {
static BlockDriver bdrv_snapshot_access_drv = {
.format_name = "snapshot-access",

.bdrv_open = snapshot_access_open,
Expand Down

0 comments on commit 9ea473f

Please sign in to comment.