summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorAnthony Liguori2013-09-03 19:32:45 +0200
committerAnthony Liguori2013-09-03 19:32:46 +0200
commitbb7d4d82b63bbde06c5584f94bfd9ba3b3e5ff3f (patch)
tree2c724450460233fefc322c664a9ed89fb862b8cb /util
parentMerge remote-tracking branch 'mjt/trivial-patches' into staging (diff)
parentqemu-iotests: Overlapping cluster allocations (diff)
downloadqemu-bb7d4d82b63bbde06c5584f94bfd9ba3b3e5ff3f.tar.gz
qemu-bb7d4d82b63bbde06c5584f94bfd9ba3b3e5ff3f.tar.xz
qemu-bb7d4d82b63bbde06c5584f94bfd9ba3b3e5ff3f.zip
Merge remote-tracking branch 'kwolf/for-anthony' into staging
# By Max Reitz (11) and others # Via Kevin Wolf * kwolf/for-anthony: (26 commits) qemu-iotests: Overlapping cluster allocations qcow2_check: Mark image consistent qcow2-refcount: Repair shared refcount blocks qcow2-refcount: Repair OFLAG_COPIED errors qcow2-refcount: Move OFLAG_COPIED checks qcow2: Employ metadata overlap checks qcow2: Metadata overlap checks qcow2: Add corrupt bit qemu-iotests: Snapshotting zero clusters qcow2-refcount: Snapshot update for zero clusters option: Add assigned flag to QEMUOptionParameter gluster: Abort on AIO completion failure block: Remove old raw driver switch raw block driver from "raw.o" to "raw_bsd.o" raw_bsd: register bdrv_raw raw_bsd: add raw_create_options raw_bsd: introduce "special members" raw_bsd: add raw_create() raw_bsd: emit debug events in bdrv_co_readv() and bdrv_co_writev() add skeleton for BSD licensed "raw" BlockDriver ... Message-id: 1378111792-20436-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-option.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 4ebdc4c33c..e0844a966c 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -275,6 +275,8 @@ int set_option_parameter(QEMUOptionParameter *list, const char *name,
return -1;
}
+ list->assigned = true;
+
return 0;
}
@@ -306,6 +308,8 @@ int set_option_parameter_int(QEMUOptionParameter *list, const char *name,
return -1;
}
+ list->assigned = true;
+
return 0;
}
@@ -397,6 +401,7 @@ QEMUOptionParameter *parse_option_parameters(const char *param,
char value[256];
char *param_delim, *value_delim;
char next_delim;
+ int i;
if (list == NULL) {
return NULL;
@@ -406,6 +411,10 @@ QEMUOptionParameter *parse_option_parameters(const char *param,
dest = allocated = append_option_parameters(NULL, list);
}
+ for (i = 0; dest[i].name; i++) {
+ dest[i].assigned = false;
+ }
+
while (*param) {
// Find parameter name and value in the string