mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
QemuOpts: Convert qemu_opts_foreach() to Error
Retain the function value for now, to permit selective conversion of its callers. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
a4c7367f7d
commit
28d0de7a4f
12 changed files with 72 additions and 54 deletions
6
tpm.c
6
tpm.c
|
@ -182,7 +182,7 @@ static int configure_tpm(QemuOpts *opts)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int tpm_init_tpmdev(QemuOpts *opts, void *dummy)
|
||||
static int tpm_init_tpmdev(void *dummy, QemuOpts *opts, Error **errp)
|
||||
{
|
||||
return configure_tpm(opts);
|
||||
}
|
||||
|
@ -207,12 +207,12 @@ void tpm_cleanup(void)
|
|||
*/
|
||||
int tpm_init(void)
|
||||
{
|
||||
if (qemu_opts_foreach(qemu_find_opts("tpmdev"), tpm_init_tpmdev, NULL)) {
|
||||
if (qemu_opts_foreach(qemu_find_opts("tpmdev"),
|
||||
tpm_init_tpmdev, NULL, NULL)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
atexit(tpm_cleanup);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue