diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-03-06 11:52:48 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-03-22 17:51:31 +0100 |
commit | 787e4a8500020695eb391e2f1cc4767ee071d441 (patch) | |
tree | 1dec822d44c48a551095b3d9242281e9c38d92bb /block | |
parent | 92b7a08d64e5e3129fa885f9d180e5bddcb76b42 (diff) | |
download | qemu-787e4a8500020695eb391e2f1cc4767ee071d441.zip qemu-787e4a8500020695eb391e2f1cc4767ee071d441.tar.gz qemu-787e4a8500020695eb391e2f1cc4767ee071d441.tar.bz2 |
block: Add options QDict to bdrv_file_open() prototypes
The new parameter is unused yet.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blkdebug.c | 5 | ||||
-rw-r--r-- | block/blkverify.c | 5 | ||||
-rw-r--r-- | block/cow.c | 2 | ||||
-rw-r--r-- | block/curl.c | 3 | ||||
-rw-r--r-- | block/gluster.c | 2 | ||||
-rw-r--r-- | block/iscsi.c | 5 | ||||
-rw-r--r-- | block/nbd.c | 3 | ||||
-rw-r--r-- | block/qcow.c | 2 | ||||
-rw-r--r-- | block/qcow2.c | 2 | ||||
-rw-r--r-- | block/qed.c | 2 | ||||
-rw-r--r-- | block/raw-posix.c | 15 | ||||
-rw-r--r-- | block/sheepdog.c | 7 | ||||
-rw-r--r-- | block/vmdk.c | 2 | ||||
-rw-r--r-- | block/vvfat.c | 3 |
14 files changed, 35 insertions, 23 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index 6f74637..37cfbc7 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -304,7 +304,8 @@ fail: } /* Valid blkdebug filenames look like blkdebug:path/to/config:path/to/image */ -static int blkdebug_open(BlockDriverState *bs, const char *filename, int flags) +static int blkdebug_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVBlkdebugState *s = bs->opaque; int ret; @@ -335,7 +336,7 @@ static int blkdebug_open(BlockDriverState *bs, const char *filename, int flags) s->state = 1; /* Open the backing file */ - ret = bdrv_file_open(&bs->file, filename, flags); + ret = bdrv_file_open(&bs->file, filename, NULL, flags); if (ret < 0) { return ret; } diff --git a/block/blkverify.c b/block/blkverify.c index 2086d97..59e3b05 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -69,7 +69,8 @@ static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb, } /* Valid blkverify filenames look like blkverify:path/to/raw_image:path/to/image */ -static int blkverify_open(BlockDriverState *bs, const char *filename, int flags) +static int blkverify_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVBlkverifyState *s = bs->opaque; int ret; @@ -89,7 +90,7 @@ static int blkverify_open(BlockDriverState *bs, const char *filename, int flags) raw = g_strdup(filename); raw[c - filename] = '\0'; - ret = bdrv_file_open(&bs->file, raw, flags); + ret = bdrv_file_open(&bs->file, raw, NULL, flags); g_free(raw); if (ret < 0) { return ret; diff --git a/block/cow.c b/block/cow.c index d73e08c..9f94599 100644 --- a/block/cow.c +++ b/block/cow.c @@ -279,7 +279,7 @@ static int cow_create(const char *filename, QEMUOptionParameter *options) return ret; } - ret = bdrv_file_open(&cow_bs, filename, BDRV_O_RDWR); + ret = bdrv_file_open(&cow_bs, filename, NULL, BDRV_O_RDWR); if (ret < 0) { return ret; } diff --git a/block/curl.c b/block/curl.c index 98947da..186e3b0 100644 --- a/block/curl.c +++ b/block/curl.c @@ -335,7 +335,8 @@ static void curl_clean_state(CURLState *s) s->in_use = 0; } -static int curl_open(BlockDriverState *bs, const char *filename, int flags) +static int curl_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVCURLState *s = bs->opaque; CURLState *state = NULL; diff --git a/block/gluster.c b/block/gluster.c index ccd684d..9ccd4d4 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -283,7 +283,7 @@ static int qemu_gluster_aio_flush_cb(void *opaque) } static int qemu_gluster_open(BlockDriverState *bs, const char *filename, - int bdrv_flags) + QDict *options, int bdrv_flags) { BDRVGlusterState *s = bs->opaque; int open_flags = O_BINARY; diff --git a/block/iscsi.c b/block/iscsi.c index 3d52921..51a2889 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1007,7 +1007,8 @@ out: * We support iscsi url's on the form * iscsi://[<username>%<password>@]<host>[:<port>]/<targetname>/<lun> */ -static int iscsi_open(BlockDriverState *bs, const char *filename, int flags) +static int iscsi_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = NULL; @@ -1203,7 +1204,7 @@ static int iscsi_create(const char *filename, QEMUOptionParameter *options) bs.opaque = g_malloc0(sizeof(struct IscsiLun)); iscsilun = bs.opaque; - ret = iscsi_open(&bs, filename, 0); + ret = iscsi_open(&bs, filename, NULL, 0); if (ret != 0) { goto out; } diff --git a/block/nbd.c b/block/nbd.c index a581294..0473908 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -376,7 +376,8 @@ static void nbd_teardown_connection(BlockDriverState *bs) closesocket(s->sock); } -static int nbd_open(BlockDriverState *bs, const char* filename, int flags) +static int nbd_open(BlockDriverState *bs, const char* filename, + QDict *options, int flags) { BDRVNBDState *s = bs->opaque; int result; diff --git a/block/qcow.c b/block/qcow.c index f6750a5..13d396b 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -679,7 +679,7 @@ static int qcow_create(const char *filename, QEMUOptionParameter *options) return ret; } - ret = bdrv_file_open(&qcow_bs, filename, BDRV_O_RDWR); + ret = bdrv_file_open(&qcow_bs, filename, NULL, BDRV_O_RDWR); if (ret < 0) { return ret; } diff --git a/block/qcow2.c b/block/qcow2.c index 98bb7f3..8ea696a 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1254,7 +1254,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, return ret; } - ret = bdrv_file_open(&bs, filename, BDRV_O_RDWR); + ret = bdrv_file_open(&bs, filename, NULL, BDRV_O_RDWR); if (ret < 0) { return ret; } diff --git a/block/qed.c b/block/qed.c index 46e12b3..4651403 100644 --- a/block/qed.c +++ b/block/qed.c @@ -558,7 +558,7 @@ static int qed_create(const char *filename, uint32_t cluster_size, return ret; } - ret = bdrv_file_open(&bs, filename, BDRV_O_RDWR | BDRV_O_CACHE_WB); + ret = bdrv_file_open(&bs, filename, NULL, BDRV_O_RDWR | BDRV_O_CACHE_WB); if (ret < 0) { return ret; } diff --git a/block/raw-posix.c b/block/raw-posix.c index 8a3cdbc..99ac869 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -303,7 +303,8 @@ static int raw_open_common(BlockDriverState *bs, const char *filename, return 0; } -static int raw_open(BlockDriverState *bs, const char *filename, int flags) +static int raw_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVRawState *s = bs->opaque; @@ -1292,7 +1293,8 @@ static int check_hdev_writable(BDRVRawState *s) return 0; } -static int hdev_open(BlockDriverState *bs, const char *filename, int flags) +static int hdev_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVRawState *s = bs->opaque; int ret; @@ -1530,7 +1532,8 @@ static BlockDriver bdrv_host_device = { }; #ifdef __linux__ -static int floppy_open(BlockDriverState *bs, const char *filename, int flags) +static int floppy_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVRawState *s = bs->opaque; int ret; @@ -1652,7 +1655,8 @@ static BlockDriver bdrv_host_floppy = { .bdrv_eject = floppy_eject, }; -static int cdrom_open(BlockDriverState *bs, const char *filename, int flags) +static int cdrom_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVRawState *s = bs->opaque; @@ -1760,7 +1764,8 @@ static BlockDriver bdrv_host_cdrom = { #endif /* __linux__ */ #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) -static int cdrom_open(BlockDriverState *bs, const char *filename, int flags) +static int cdrom_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { BDRVRawState *s = bs->opaque; int ret; diff --git a/block/sheepdog.c b/block/sheepdog.c index 54d3e53..bb67c4c 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1126,7 +1126,8 @@ static int write_object(int fd, char *buf, uint64_t oid, int copies, create, cache_flags); } -static int sd_open(BlockDriverState *bs, const char *filename, int flags) +static int sd_open(BlockDriverState *bs, const char *filename, + QDict *options, int flags) { int ret, fd; uint32_t vid = 0; @@ -1269,7 +1270,7 @@ static int sd_prealloc(const char *filename) void *buf = g_malloc0(SD_DATA_OBJ_SIZE); int ret; - ret = bdrv_file_open(&bs, filename, BDRV_O_RDWR); + ret = bdrv_file_open(&bs, filename, NULL, BDRV_O_RDWR); if (ret < 0) { goto out; } @@ -1367,7 +1368,7 @@ static int sd_create(const char *filename, QEMUOptionParameter *options) goto out; } - ret = bdrv_file_open(&bs, backing_file, 0); + ret = bdrv_file_open(&bs, backing_file, NULL, 0); if (ret < 0) { goto out; } diff --git a/block/vmdk.c b/block/vmdk.c index e92104a..7bad757 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -661,7 +661,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, path_combine(extent_path, sizeof(extent_path), desc_file_path, fname); - ret = bdrv_file_open(&extent_file, extent_path, bs->open_flags); + ret = bdrv_file_open(&extent_file, extent_path, NULL, bs->open_flags); if (ret) { return ret; } diff --git a/block/vvfat.c b/block/vvfat.c index b8eb38a..ef74c30 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -988,7 +988,8 @@ static void vvfat_rebind(BlockDriverState *bs) s->bs = bs; } -static int vvfat_open(BlockDriverState *bs, const char* dirname, int flags) +static int vvfat_open(BlockDriverState *bs, const char* dirname, + QDict *options, int flags) { BDRVVVFATState *s = bs->opaque; int i, cyls, heads, secs; |