From bb67ab0290b9a83d4d444e2e9a0311d3b9b54385 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 1 Jun 2010 10:47:34 +0200 Subject: qemu-option: New qemu_opts_reset() Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- qemu-option.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qemu-option.c') 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) { -- cgit v1.2.3