From 17f7053283eb00561302bbfd53fda05d93895ea0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 8 Aug 2011 14:15:46 -0700 Subject: [RHEL6 qemu-kvm PATCH 4/7] error: New qemu_opts_loc_restore() RH-Author: Markus Armbruster Message-id: <1312812947-8303-5-git-send-email-armbru@redhat.com> Patchwork-id: 31081 O-Subject: [RHEL6 PATCH qemu-kvm 4/5] error: New qemu_opts_loc_restore() Bugzilla: 711354 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Paolo Bonzini RH-Acked-by: Amit Shah 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 Signed-off-by: Kevin Wolf (cherry picked from commit 94ac726842d37b50c7742ecb643bebe2e5d72cd2) --- qemu-option.c | 5 +++++ qemu-option.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost --- qemu-option.c | 5 +++++ qemu-option.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 6a8d1c4..afd5efe 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -708,6 +708,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) { diff --git a/qemu-option.h b/qemu-option.h index 8c8cc67..e98144e 100644 --- a/qemu-option.h +++ b/qemu-option.h @@ -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); -- 1.7.3.2