Bring the block files in line with the QEMU coding style, with spaces for indentation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371
Signed-off-by: Yeqi Fu <[email protected]> --- block/bochs.c | 12 +++++------ block/file-posix.c | 52 ++++++++++++++++++++++----------------------- block/file-win32.c | 38 ++++++++++++++++----------------- block/parallels.c | 10 ++++----- block/qcow.c | 10 ++++----- include/block/nbd.h | 2 +- 6 files changed, 62 insertions(+), 62 deletions(-) diff --git a/block/bochs.c b/block/bochs.c index 2f5ae52c90..8ff38ac0d9 100644 --- a/block/bochs.c +++ b/block/bochs.c @@ -293,15 +293,15 @@ static void bochs_close(BlockDriverState *bs) } static BlockDriver bdrv_bochs = { - .format_name = "bochs", - .instance_size = sizeof(BDRVBochsState), - .bdrv_probe = bochs_probe, - .bdrv_open = bochs_open, + .format_name = "bochs", + .instance_size = sizeof(BDRVBochsState), + .bdrv_probe = bochs_probe, + .bdrv_open = bochs_open, .bdrv_child_perm = bdrv_default_perms, .bdrv_refresh_limits = bochs_refresh_limits, .bdrv_co_preadv = bochs_co_preadv, - .bdrv_close = bochs_close, - .is_format = true, + .bdrv_close = bochs_close, + .is_format = true, }; static void bdrv_bochs_init(void) diff --git a/block/file-posix.c b/block/file-posix.c index 5760cf22d1..9ba1600a77 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -124,7 +124,7 @@ #define FTYPE_FILE 0 #define FTYPE_CD 1 -#define MAX_BLOCKSIZE 4096 +#define MAX_BLOCKSIZE 4096 /* Posix file locking bytes. Libvirt takes byte 0, we start from higher bytes, * leaving a few more bytes for its future use. */ @@ -3819,14 +3819,14 @@ static void coroutine_fn cdrom_co_lock_medium(BlockDriverState *bs, bool locked) } static BlockDriver bdrv_host_cdrom = { - .format_name = "host_cdrom", - .protocol_name = "host_cdrom", - .instance_size = sizeof(BDRVRawState), + .format_name = "host_cdrom", + .protocol_name = "host_cdrom", + .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = true, - .bdrv_probe_device = cdrom_probe_device, + .bdrv_probe_device = cdrom_probe_device, .bdrv_parse_filename = cdrom_parse_filename, - .bdrv_file_open = cdrom_open, - .bdrv_close = raw_close, + .bdrv_file_open = cdrom_open, + .bdrv_close = raw_close, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, @@ -3835,12 +3835,12 @@ static BlockDriver bdrv_host_cdrom = { .mutable_opts = mutable_opts, .bdrv_co_invalidate_cache = raw_co_invalidate_cache, - .bdrv_co_preadv = raw_co_preadv, - .bdrv_co_pwritev = raw_co_pwritev, - .bdrv_co_flush_to_disk = raw_co_flush_to_disk, - .bdrv_refresh_limits = raw_refresh_limits, - .bdrv_co_io_plug = raw_co_io_plug, - .bdrv_co_io_unplug = raw_co_io_unplug, + .bdrv_co_preadv = raw_co_preadv, + .bdrv_co_pwritev = raw_co_pwritev, + .bdrv_co_flush_to_disk = raw_co_flush_to_disk, + .bdrv_refresh_limits = raw_refresh_limits, + .bdrv_co_io_plug = raw_co_io_plug, + .bdrv_co_io_unplug = raw_co_io_unplug, .bdrv_attach_aio_context = raw_aio_attach_aio_context, .bdrv_co_truncate = raw_co_truncate, @@ -3949,27 +3949,27 @@ static void coroutine_fn cdrom_co_lock_medium(BlockDriverState *bs, bool locked) } static BlockDriver bdrv_host_cdrom = { - .format_name = "host_cdrom", - .protocol_name = "host_cdrom", - .instance_size = sizeof(BDRVRawState), + .format_name = "host_cdrom", + .protocol_name = "host_cdrom", + .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = true, - .bdrv_probe_device = cdrom_probe_device, + .bdrv_probe_device = cdrom_probe_device, .bdrv_parse_filename = cdrom_parse_filename, - .bdrv_file_open = cdrom_open, - .bdrv_close = raw_close, + .bdrv_file_open = cdrom_open, + .bdrv_close = raw_close, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, .bdrv_co_create_opts = bdrv_co_create_opts_simple, .create_opts = &bdrv_create_opts_simple, - .mutable_opts = mutable_opts, + .mutable_opts = mutable_opts, - .bdrv_co_preadv = raw_co_preadv, - .bdrv_co_pwritev = raw_co_pwritev, - .bdrv_co_flush_to_disk = raw_co_flush_to_disk, - .bdrv_refresh_limits = raw_refresh_limits, - .bdrv_co_io_plug = raw_co_io_plug, - .bdrv_co_io_unplug = raw_co_io_unplug, + .bdrv_co_preadv = raw_co_preadv, + .bdrv_co_pwritev = raw_co_pwritev, + .bdrv_co_flush_to_disk = raw_co_flush_to_disk, + .bdrv_refresh_limits = raw_refresh_limits, + .bdrv_co_io_plug = raw_co_io_plug, + .bdrv_co_io_unplug = raw_co_io_unplug, .bdrv_attach_aio_context = raw_aio_attach_aio_context, .bdrv_co_truncate = raw_co_truncate, diff --git a/block/file-win32.c b/block/file-win32.c index c7d0b85306..3b3fa3ad8c 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -743,31 +743,31 @@ static QemuOptsList raw_create_opts = { }; BlockDriver bdrv_file = { - .format_name = "file", - .protocol_name = "file", - .instance_size = sizeof(BDRVRawState), + .format_name = "file", + .protocol_name = "file", + .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = true, .bdrv_parse_filename = raw_parse_filename, - .bdrv_file_open = raw_open, + .bdrv_file_open = raw_open, .bdrv_refresh_limits = raw_probe_alignment, - .bdrv_close = raw_close, + .bdrv_close = raw_close, .bdrv_co_create_opts = raw_co_create_opts, - .bdrv_has_zero_init = bdrv_has_zero_init_1, + .bdrv_has_zero_init = bdrv_has_zero_init_1, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, - .bdrv_aio_preadv = raw_aio_preadv, - .bdrv_aio_pwritev = raw_aio_pwritev, - .bdrv_aio_flush = raw_aio_flush, + .bdrv_aio_preadv = raw_aio_preadv, + .bdrv_aio_pwritev = raw_aio_pwritev, + .bdrv_aio_flush = raw_aio_flush, - .bdrv_co_truncate = raw_co_truncate, - .bdrv_co_getlength = raw_co_getlength, + .bdrv_co_truncate = raw_co_truncate, + .bdrv_co_getlength = raw_co_getlength, .bdrv_co_get_allocated_file_size - = raw_co_get_allocated_file_size, + = raw_co_get_allocated_file_size, - .create_opts = &raw_create_opts, + .create_opts = &raw_create_opts, }; /***********************************************/ @@ -915,14 +915,14 @@ done: } static BlockDriver bdrv_host_device = { - .format_name = "host_device", - .protocol_name = "host_device", - .instance_size = sizeof(BDRVRawState), + .format_name = "host_device", + .protocol_name = "host_device", + .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = true, .bdrv_parse_filename = hdev_parse_filename, - .bdrv_probe_device = hdev_probe_device, - .bdrv_file_open = hdev_open, - .bdrv_close = raw_close, + .bdrv_probe_device = hdev_probe_device, + .bdrv_file_open = hdev_open, + .bdrv_close = raw_close, .bdrv_refresh_limits = hdev_refresh_limits, .bdrv_aio_preadv = raw_aio_preadv, diff --git a/block/parallels.c b/block/parallels.c index 013684801a..b0b37e4522 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -917,11 +917,11 @@ static void parallels_close(BlockDriverState *bs) } static BlockDriver bdrv_parallels = { - .format_name = "parallels", - .instance_size = sizeof(BDRVParallelsState), - .bdrv_probe = parallels_probe, - .bdrv_open = parallels_open, - .bdrv_close = parallels_close, + .format_name = "parallels", + .instance_size = sizeof(BDRVParallelsState), + .bdrv_probe = parallels_probe, + .bdrv_open = parallels_open, + .bdrv_close = parallels_close, .bdrv_child_perm = bdrv_default_perms, .bdrv_co_block_status = parallels_co_block_status, .bdrv_has_zero_init = bdrv_has_zero_init_1, diff --git a/block/qcow.c b/block/qcow.c index 490e4f819e..bb84a56fc9 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -1177,11 +1177,11 @@ static const char *const qcow_strong_runtime_opts[] = { }; static BlockDriver bdrv_qcow = { - .format_name = "qcow", - .instance_size = sizeof(BDRVQcowState), - .bdrv_probe = qcow_probe, - .bdrv_open = qcow_open, - .bdrv_close = qcow_close, + .format_name = "qcow", + .instance_size = sizeof(BDRVQcowState), + .bdrv_probe = qcow_probe, + .bdrv_open = qcow_open, + .bdrv_close = qcow_close, .bdrv_child_perm = bdrv_default_perms, .bdrv_reopen_prepare = qcow_reopen_prepare, .bdrv_co_create = qcow_co_create, diff --git a/include/block/nbd.h b/include/block/nbd.h index a4c98169c3..4f5803fd9b 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -224,7 +224,7 @@ enum { NBD_CMD_BLOCK_STATUS = 7, }; -#define NBD_DEFAULT_PORT 10809 +#define NBD_DEFAULT_PORT 10809 /* Maximum size of a single READ/WRITE data buffer */ #define NBD_MAX_BUFFER_SIZE (32 * 1024 * 1024) -- 2.32.0 (Apple Git-132)
