[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 34/42] blkverify: Don't require protocol filename
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 34/42] blkverify: Don't require protocol filename |
Date: |
Wed, 15 Jan 2014 11:22:47 +0100 |
From: Max Reitz <address@hidden>
If the filename is not prefixed by "blkverify:" in
blkverify_parse_filename(), the blkverify driver was not selected
through that protocol prefix, but by an explicit command line (or QMP)
option (like driver=blkverify).
If blkverify_parse_filename() has been called, a filename has been
given. If it is not prefixed, it is probably really just a plain
filename. This is no problem, since we can use it as the test image
filename and rely on the user to specify the raw image filename through
the new corresponding option.
Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/blkverify.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index dc14290..a2e8f5f 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -78,7 +78,9 @@ static void blkverify_parse_filename(const char *filename,
QDict *options,
/* Parse the blkverify: prefix */
if (!strstart(filename, "blkverify:", &filename)) {
- error_setg(errp, "File name string must start with 'blkverify:'");
+ /* There was no prefix; therefore, all options have to be already
+ present in the QDict (except for the filename) */
+ qdict_put(options, "x-image", qstring_from_str(filename));
return;
}
--
1.8.1.4
- [Qemu-devel] [PULL 23/42] blkdebug: Always call read_config(), (continued)
- [Qemu-devel] [PULL 23/42] blkdebug: Always call read_config(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 26/42] block: Pass reference to bdrv_file_open(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 25/42] block: Allow reference for bdrv_file_open(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 28/42] block: Add bdrv_open_image(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 29/42] block: Use bdrv_open_image() in bdrv_open(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 31/42] blockdev: Move "file" to legacy_opts, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 32/42] blkdebug: Allow command-line file configuration, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 30/42] block: Allow recursive "file"s, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 33/42] blkverify: Allow command-line configuration, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 35/42] qapi: Add "errno" to the list of polluted words, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 34/42] blkverify: Don't require protocol filename,
Kevin Wolf <=
- [Qemu-devel] [PULL 36/42] qapi: QMP interface for blkdebug and blkverify, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 37/42] qemu-io: Make filename optional, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 39/42] tests: Add test for qdict_flatten(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 40/42] iotests: Test new blkdebug/blkverify interface, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 38/42] tests: Add test for qdict_array_split(), Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 41/42] iotests: Test file format nesting, Kevin Wolf, 2014/01/15