mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -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
|
@ -41,7 +41,7 @@ typedef struct TPMIfClass {
|
|||
InterfaceClass parent_class;
|
||||
|
||||
enum TpmModel model;
|
||||
void (*request_completed)(TPMIf *obj);
|
||||
void (*request_completed)(TPMIf *obj, int ret);
|
||||
enum TPMVersion (*get_version)(TPMIf *obj);
|
||||
} TPMIfClass;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "qapi-types.h"
|
||||
#include "qemu/option.h"
|
||||
#include "sysemu/tpm.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
#define TYPE_TPM_BACKEND "tpm-backend"
|
||||
#define TPM_BACKEND(obj) \
|
||||
|
@ -84,7 +85,7 @@ struct TPMBackendClass {
|
|||
|
||||
TpmTypeOptions *(*get_tpm_options)(TPMBackend *t);
|
||||
|
||||
void (*handle_request)(TPMBackend *s, TPMBackendCmd *cmd);
|
||||
void (*handle_request)(TPMBackend *s, TPMBackendCmd *cmd, Error **errp);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue