[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/13] qemu-option: New qemu_opts_reset()
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 10/13] qemu-option: New qemu_opts_reset() |
Date: |
Wed, 2 Jun 2010 18:55:26 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
---
qemu-option.c | 9 +++++++++
qemu-option.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/qemu-option.c b/qemu-option.c
index acd74f9..87e324c 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -698,6 +698,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)
{
diff --git a/qemu-option.h b/qemu-option.h
index 4823219..9e2406c 100644
--- a/qemu-option.h
+++ b/qemu-option.h
@@ -115,6 +115,7 @@ int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc
func, void *opaque,
QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id);
QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int
fail_if_exists);
+void qemu_opts_reset(QemuOptsList *list);
int qemu_opts_set(QemuOptsList *list, const char *id,
const char *name, const char *value);
const char *qemu_opts_id(QemuOpts *opts);
--
1.6.6.1
- [Qemu-devel] [PATCH 01/13] block: Move error actions from DriveInfo to BlockDriverState, (continued)
- [Qemu-devel] [PATCH 01/13] block: Move error actions from DriveInfo to BlockDriverState, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 04/13] block: New bdrv_next(), Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 05/13] block: Decouple savevm from DriveInfo, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 11/13] qemu-option: New qemu_opt_next(), qemu_opt_name(), Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 07/13] blockdev: Means to destroy blockdev only if made with drive_init(), Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 02/13] block: Decouple block device "commit all" from DriveInfo, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 09/13] blockdev: drive_get_by_id() is no longer used, remove, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 06/13] blockdev: Give drives internal linkage, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 10/13] qemu-option: New qemu_opts_reset(),
Markus Armbruster <=
- [Qemu-devel] [PATCH 08/13] qdev: Decouple qdev_prop_drive from DriveInfo, Markus Armbruster, 2010/06/02
- [Qemu-devel] [PATCH 13/13] blockdev: New -blockdev to define a host block device, Markus Armbruster, 2010/06/02
- Re: [Qemu-devel] [PATCH 13/13] blockdev: New -blockdev to define a host block device, Anthony Liguori, 2010/06/14