error: New qemu_opts_loc_restore()

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>
This commit is contained in:
Markus Armbruster 2010-05-27 21:06:04 +02:00 committed by Kevin Wolf
parent 620f862e1c
commit 94ac726842
2 changed files with 6 additions and 0 deletions

View 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)
{

View 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);