mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
tpm: report backend request error
Use an Error** for request to let the caller handle error reporting. This will also allow to inform the frontend of a backend error. 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
c4fb8561bc
commit
6a8a23549a
6 changed files with 33 additions and 36 deletions
|
@ -393,7 +393,7 @@ static void tpm_tis_prep_abort(TPMState *s, uint8_t locty, uint8_t newlocty)
|
|||
/*
|
||||
* Callback from the TPM to indicate that the response was received.
|
||||
*/
|
||||
static void tpm_tis_request_completed(TPMIf *ti)
|
||||
static void tpm_tis_request_completed(TPMIf *ti, int ret)
|
||||
{
|
||||
TPMState *s = TPM(ti);
|
||||
uint8_t locty = s->cmd.locty;
|
||||
|
@ -405,6 +405,7 @@ static void tpm_tis_request_completed(TPMIf *ti)
|
|||
}
|
||||
}
|
||||
|
||||
/* FIXME: report error if ret != 0 */
|
||||
tpm_tis_sts_set(&s->loc[locty],
|
||||
TPM_TIS_STS_VALID | TPM_TIS_STS_DATA_AVAILABLE);
|
||||
s->loc[locty].state = TPM_TIS_STATE_COMPLETION;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue