Skip to content

Commit 9ea473f

Browse files
committed
block: Make more BlockDriver definitions static
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>
1 parent 9e03a5e commit 9ea473f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

block/copy-before-write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static void cbw_close(BlockDriverState *bs)
503503
s->bcs = NULL;
504504
}
505505

506-
BlockDriver bdrv_cbw_filter = {
506+
static BlockDriver bdrv_cbw_filter = {
507507
.format_name = "copy-before-write",
508508
.instance_size = sizeof(BDRVCopyBeforeWriteState),
509509

block/preallocate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ static void preallocate_child_perm(BlockDriverState *bs, BdrvChild *c,
535535
}
536536
}
537537

538-
BlockDriver bdrv_preallocate_filter = {
538+
static BlockDriver bdrv_preallocate_filter = {
539539
.format_name = "preallocate",
540540
.instance_size = sizeof(BDRVPreallocateState),
541541

block/snapshot-access.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static void snapshot_access_child_perm(BlockDriverState *bs, BdrvChild *c,
108108
*nshared = BLK_PERM_ALL;
109109
}
110110

111-
BlockDriver bdrv_snapshot_access_drv = {
111+
static BlockDriver bdrv_snapshot_access_drv = {
112112
.format_name = "snapshot-access",
113113

114114
.bdrv_open = snapshot_access_open,

0 commit comments

Comments
 (0)