more BlockDriver C99 initializers
PATCH 1/1 more BlockDriver C99 initializers
Looks like the two bdrv_raw instances were missed last time.
Signed-off-by Christoph Hellwig <[email protected]>
block-raw-posix.c +14 -17
@@ -876,27 +876,24 @@ static void raw_flush(BlockDriverState * }BlockDriver bdrv_raw = { -"raw" , -sizeof (BDRVRawState), -NULL ,/* no probe for protocols */ - raw_open, -NULL , -NULL , - raw_close, - raw_create, - raw_flush, + .format_name ="raw" , + .instance_size =sizeof (BDRVRawState), + .bdrv_open = raw_open, + .bdrv_close = raw_close, + .bdrv_create = raw_create, + .bdrv_flush = raw_flush, #ifdef CONFIG_AIO - .bdrv_aio_read = raw_aio_read, - .bdrv_aio_write = raw_aio_write, - .bdrv_aio_cancel = raw_aio_cancel, - .aiocb_size =sizeof (RawAIOCB), + .bdrv_aio_read = raw_aio_read, + .bdrv_aio_write = raw_aio_write, + .bdrv_aio_cancel = raw_aio_cancel, + .aiocb_size =sizeof (RawAIOCB), #endif - .bdrv_read = raw_read, - .bdrv_write = raw_write, - .bdrv_truncate = raw_truncate, - .bdrv_getlength = raw_getlength, + .bdrv_read = raw_read, + .bdrv_write = raw_write, + .bdrv_truncate = raw_truncate, + .bdrv_getlength = raw_getlength, };/***********************************************/
block-raw-win32.c +10 -14
@@ -229,20 +229,16 @@ static int raw_create(const char *filena }BlockDriver bdrv_raw = { -"raw" , -sizeof (BDRVRawState), -NULL ,/* no probe for protocols */ - raw_open, -NULL , -NULL , - raw_close, - raw_create, - raw_flush, - - .bdrv_read = raw_read, - .bdrv_write = raw_write, - .bdrv_truncate = raw_truncate, - .bdrv_getlength = raw_getlength, + .format_name ="raw" , + .instance_size =sizeof (BDRVRawState), + .bdrv_open = raw_open, + .bdrv_close = raw_close, + .bdrv_create = raw_create, + .bdrv_flush = raw_flush, + .bdrv_read = raw_read, + .bdrv_write = raw_write, + .bdrv_truncate = raw_truncate, + .bdrv_getlength = raw_getlength, };/***********************************************/
Quoted 2 lines · Christoph Hellwig
Looks like the two
bdrv_rawinstances were missed last time.
tabs->spaces...
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 5 lines · Avi Kivity
Quoted 2 lines · Christoph Hellwig
Looks like the two
bdrv_rawinstances were missed last time.
tabs->spaces...
This matches the other initializers around them.
In the meantime the block-posix-raw one got fixes as part of the fix sparse warnings patch.
PATCH 1/1 missing block-raw-win32.c C99 initializer conversion
In reply to Christoph HellwigSigned-off-by Christoph Hellwig <[email protected]>
block-raw-win32.c +10 -14
@@ -229,20 +229,16 @@ static int raw_create(const char *filena }BlockDriver bdrv_raw = { -"raw" , -sizeof (BDRVRawState), -NULL ,/* no probe for protocols */ - raw_open, -NULL , -NULL , - raw_close, - raw_create, - raw_flush, - - .bdrv_read = raw_read, - .bdrv_write = raw_write, - .bdrv_truncate = raw_truncate, - .bdrv_getlength = raw_getlength, + .format_name ="raw" , + .instance_size =sizeof (BDRVRawState), + .bdrv_open = raw_open, + .bdrv_close = raw_close, + .bdrv_create = raw_create, + .bdrv_flush = raw_flush, + .bdrv_read = raw_read, + .bdrv_write = raw_write, + .bdrv_truncate = raw_truncate, + .bdrv_getlength = raw_getlength, };/***********************************************/
Anthony Liguori
AppliedQuoted 5 lines · Christoph Hellwig
Looks like the two
bdrv_rawinstances were missed last time.Signed-off-by Christoph Hellwig <[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori