From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56656 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW7BO-0003Vc-7S for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:23:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OW6xQ-0003JA-O4 for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:09:03 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:38911) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW6xQ-0003IO-IY for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:09:00 -0400 From: Markus Armbruster Date: Tue, 6 Jul 2010 14:08:50 +0200 Message-Id: <1278418136-24556-8-git-send-email-armbru@redhat.com> In-Reply-To: <1278418136-24556-1-git-send-email-armbru@redhat.com> References: <1278418136-24556-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 07/13] error: New qemu_opts_loc_restore() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, kraxel@redhat.com, hch@lst.de 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 --- 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 30327d4..1f8f41a 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -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) { diff --git a/qemu-option.h b/qemu-option.h index 9e2406c..b515813 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.6.6.1