qemu-config: introduce qemu_find_opts_err()

This is like qemu_find_opts(), except that it takes an Error argument.

This new function allows for a incremental conversion of code using
qemu_find_opts().

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-By: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Luiz Capitulino 2012-03-28 14:16:37 -03:00
parent 2ac2061338
commit 60d5666f7d
2 changed files with 8 additions and 0 deletions

View File

@ -661,6 +661,11 @@ QemuOptsList *qemu_find_opts(const char *group)
return ret;
}
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp)
{
return find_list(vm_config_groups, group, errp);
}
void qemu_add_opts(QemuOptsList *list)
{
int entries, i;

View File

@ -1,11 +1,14 @@
#ifndef QEMU_CONFIG_H
#define QEMU_CONFIG_H
#include "error.h"
extern QemuOptsList qemu_fsdev_opts;
extern QemuOptsList qemu_virtfs_opts;
extern QemuOptsList qemu_spice_opts;
QemuOptsList *qemu_find_opts(const char *group);
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
void qemu_add_opts(QemuOptsList *list);
int qemu_set_option(const char *str);
int qemu_global_option(const char *str);