Skip to contentSkip to conversation

more BlockDriver C99 initializers

PATCH Applied Christoph Hellwig 3 participants 6 messages Apr 6, 2009 – Apr 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 more BlockDriver C99 initializers

Looks like the two bdrv_raw instances were missed last time.

block-raw-posix.c +14 -17
Index: qemu/block-raw-posix.c
===================================================================
@@ -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
Index: qemu/block-raw-win32.c
===================================================================
@@ -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,
 };
 
 /***********************************************/
#1 lore raw
Quoted 2 lines · Christoph Hellwig

Looks like the two bdrv_raw instances were missed last time.

tabs->spaces...

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 5 lines · Avi Kivity
Quoted 2 lines · Christoph Hellwig

Looks like the two bdrv_raw instances were missed last time.

tabs->spaces...

This matches the other initializers around them.

#4 lore raw

PATCH 1/1 missing block-raw-win32.c C99 initializer conversion

In reply to Christoph Hellwig
block-raw-win32.c +10 -14
Index: qemu/block-raw-win32.c
===================================================================
@@ -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,
 };
 
 /***********************************************/