]> git.proxmox.com Git - qemu.git/commitdiff
error: New qemu_opts_loc_restore()
authorMarkus Armbruster <armbru@redhat.com>
Thu, 27 May 2010 19:06:04 +0000 (21:06 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 6 Jul 2010 15:05:49 +0000 (17:05 +0200)
Needed for decent error locations when complaining about options
outside of qemu_opts_foreach().  That one sets the location
already.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-option.c
qemu-option.h

index 30327d48040e829ba32e4b06fe22ad888df6f94c..1f8f41ae7d0742ec7819e5fe9fd1f5868e21287b 100644 (file)
@@ -728,6 +728,11 @@ void qemu_opts_reset(QemuOptsList *list)
     }
 }
 
+void qemu_opts_loc_restore(QemuOpts *opts)
+{
+    loc_restore(&opts->loc);
+}
+
 int qemu_opts_set(QemuOptsList *list, const char *id,
                   const char *name, const char *value)
 {
index 9e2406c56204f4b5d9453a0c7b4eaf0839b1ad32..b515813891997f22b9e9cf062c8428746207fa4a 100644 (file)
@@ -116,6 +116,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);
+void qemu_opts_loc_restore(QemuOpts *opts);
 int qemu_opts_set(QemuOptsList *list, const char *id,
                   const char *name, const char *value);
 const char *qemu_opts_id(QemuOpts *opts);