aboutsummaryrefslogtreecommitdiff
path: root/qemu-option.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-01 10:47:34 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-02 13:18:02 +0200
commitbb67ab0290b9a83d4d444e2e9a0311d3b9b54385 (patch)
tree60c61352c062f7567aefa59599af68a1786df414 /qemu-option.c
parent18846dee1a795b4345ac0bd10b70a3a46fd14287 (diff)
qemu-option: New qemu_opts_reset()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-option.c')
-rw-r--r--qemu-option.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/qemu-option.c b/qemu-option.c
index 7f70d0f5fb..30327d4804 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -719,6 +719,15 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exist
return opts;
}
+void qemu_opts_reset(QemuOptsList *list)
+{
+ QemuOpts *opts, *next_opts;
+
+ QTAILQ_FOREACH_SAFE(opts, &list->head, next, next_opts) {
+ qemu_opts_del(opts);
+ }
+}
+
int qemu_opts_set(QemuOptsList *list, const char *id,
const char *name, const char *value)
{