mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
tpm-be: report error instead of front-end
Backend can give more accurate error description, and lift out the job from the frontend. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
689990598a
commit
0bd6c8a9cf
3 changed files with 5 additions and 5 deletions
|
@ -54,9 +54,10 @@ enum TpmType tpm_backend_get_type(TPMBackend *s)
|
|||
return k->type;
|
||||
}
|
||||
|
||||
int tpm_backend_init(TPMBackend *s, TPMIf *tpmif)
|
||||
int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp)
|
||||
{
|
||||
if (s->tpmif) {
|
||||
error_setg(errp, "TPM backend '%s' is already initialized", s->id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue