summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-04-12 20:02:37 +0200
committerKevin Wolf <kwolf@redhat.com>2013-04-22 11:34:35 +0200
commit56d1b4d21d444619302d3f1291a133b1c2b9b072 (patch)
treed11c298da04c8342088cba4ae75cd51e381d15ad /block.c
parent7ad9be64e8ac17811ff358279ef7193cc623da1a (diff)
downloadqemu-56d1b4d21d444619302d3f1291a133b1c2b9b072.zip
block: Remove filename parameter from .bdrv_file_open()
It is unused now in all block drivers. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/block.c b/block.c
index e3464d6b03..6e07f4572b 100644
--- a/block.c
+++ b/block.c
@@ -722,7 +722,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
if (drv->bdrv_file_open) {
assert(file == NULL);
assert(drv->bdrv_parse_filename || filename != NULL);
- ret = drv->bdrv_file_open(bs, filename, options, open_flags);
+ ret = drv->bdrv_file_open(bs, options, open_flags);
} else {
if (file == NULL) {
qerror_report(ERROR_CLASS_GENERIC_ERROR, "Can't use '%s' as a "
@@ -826,6 +826,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char *filename,
ret = -EINVAL;
goto fail;
}
+ qdict_del(options, "filename");
} else if (!drv->bdrv_parse_filename && !filename) {
qerror_report(ERROR_CLASS_GENERIC_ERROR,
"The '%s' block driver requires a file name",
@@ -839,11 +840,6 @@ int bdrv_file_open(BlockDriverState **pbs, const char *filename,
goto fail;
}
- /* TODO Remove once all protocols know the filename option */
- if (qdict_haskey(options, "filename")) {
- qdict_del(options, "filename");
- }
-
/* Check if any unknown options were used */
if (qdict_size(options) != 0) {
const QDictEntry *entry = qdict_first(options);