diff options
author | Amarnath Valluri <amarnath.valluri@intel.com> | 2017-09-29 14:10:16 +0300 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-10-13 07:34:33 -0400 |
commit | 93330cf542b920b6ea5fea8120a08b76bb353113 (patch) | |
tree | 8450f62f15427f279ea4257877d6ce91a062fcab /include/sysemu | |
parent | f35fe5cb97bbdaa6a6967f2fefc3fc1f79680601 (diff) |
tpm-backend: Made few interface methods optional
This allows backend implementations left optional interface methods.
For mandatory methods assertion checks added.
Took the opportunity to remove unused methods:
- tpm_backend_get_desc()
- TPMDriverOps->handle_startup_error
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Reviewed-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>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/tpm_backend.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index 202ec8d5a2..9ea707253a 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -47,6 +47,7 @@ struct TPMBackend { TPMState *tpm_state; GThreadPool *thread_pool; TPMRecvDataCB *recv_data_callback; + bool had_startup_error; char *id; enum TpmModel fe_model; @@ -75,7 +76,7 @@ struct TPMDriverOps { enum TpmType type; const QemuOptDesc *opts; /* get a descriptive text of the backend to display to the user */ - const char *(*desc)(void); + const char *desc; TPMBackend *(*create)(QemuOpts *opts, const char *id); @@ -83,8 +84,6 @@ struct TPMDriverOps { int (*init)(TPMBackend *t); /* start up the TPM on the backend */ int (*startup_tpm)(TPMBackend *t); - /* returns true if nothing will ever answer TPM requests */ - bool (*had_startup_error)(TPMBackend *t); size_t (*realloc_buffer)(TPMSizedBuffer *sb); @@ -109,14 +108,6 @@ struct TPMDriverOps { enum TpmType tpm_backend_get_type(TPMBackend *s); /** - * tpm_backend_get_desc: - * @s: the backend - * - * Returns a human readable description of the backend. - */ -const char *tpm_backend_get_desc(TPMBackend *s); - -/** * tpm_backend_init: * @s: the backend to initialized * @state: TPMState |