diff --git a/block-raw-posix.c b/block-raw-posix.c index 50aad587dcc205b2cbf40bdc7aad1376197b29e3..4da5ae4397024d5abe0918fa7f3d676349b432ac 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -876,15 +876,15 @@ static void raw_flush(BlockDriverState *bs) } 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_probe = NULL, /* no probe for protocols */ + .bdrv_open = raw_open, + .bdrv_read = raw_read, + .bdrv_write = raw_write, + .bdrv_close = raw_close, + .bdrv_create = raw_create, + .bdrv_flush = raw_flush, #ifdef CONFIG_AIO .bdrv_aio_read = raw_aio_read, @@ -893,8 +893,6 @@ BlockDriver bdrv_raw = { .aiocb_size = sizeof(RawAIOCB), #endif - .bdrv_read = raw_read, - .bdrv_write = raw_write, .bdrv_truncate = raw_truncate, .bdrv_getlength = raw_getlength, }; diff --git a/cmd.c b/cmd.c index e2f4486a10f2f27d98c0e2045b9511bce056ee4a..1dc5dbd6875f56e078c126a950553d39a3fbd6e7 100644 --- a/cmd.c +++ b/cmd.c @@ -212,8 +212,6 @@ command_loop(void) # include #endif -extern char *progname; - static char * get_prompt(void) { diff --git a/cmd.h b/cmd.h index 5ca8fcf0783c548a09f2d530ce97c5b5a1022793..c5be50f80f037c1c37ab7897138cecffbfdab1f0 100644 --- a/cmd.h +++ b/cmd.h @@ -75,4 +75,6 @@ enum { extern void timestr(struct timeval *tv, char *str, size_t sz, int flags); +extern char *progname; + #endif /* __COMMAND_H__ */ diff --git a/dma-helpers.c b/dma-helpers.c index 1469e34df9ba99665be7805720cce2febf13e8b2..f9eb2240b2ce42868594d214d705bfac0cdf5968 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -81,7 +81,7 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs) } } -void dma_bdrv_cb(void *opaque, int ret) +static void dma_bdrv_cb(void *opaque, int ret) { DMAAIOCB *dbs = (DMAAIOCB *)opaque; target_phys_addr_t cur_addr, cur_len;