Message ID | 20210506135923.161427-6-jandryuk@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | vtpmmgr: Some fixes - still incomplete | expand |
On 5/6/21 9:59 AM, Jason Andryuk wrote: > Reposition vtpmmgr_shutdown so it can call flush_tpm2 without a forward > declaration. > > Signed-off-by: Jason Andryuk <jandryuk@gmail.com> > Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com> > stubdom/vtpmmgr/init.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c > index 130e4f4bf6..decf8e8b4d 100644 > --- a/stubdom/vtpmmgr/init.c > +++ b/stubdom/vtpmmgr/init.c > @@ -503,20 +503,6 @@ egress: > return status; > } > > -void vtpmmgr_shutdown(void) > -{ > - /* Cleanup TPM resources */ > - TPM_TerminateHandle(vtpm_globals.oiap.AuthHandle); > - > - /* Close tpmback */ > - shutdown_tpmback(); > - > - /* Close tpmfront/tpm_tis */ > - close(vtpm_globals.tpm_fd); > - > - vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager stopped.\n"); > -} > - > /* TPM 2.0 */ > > static void tpm2_AuthArea_ctor(const char *authValue, UINT32 authLen, > @@ -797,3 +783,17 @@ abort_egress: > egress: > return status; > } > + > +void vtpmmgr_shutdown(void) > +{ > + /* Cleanup TPM resources */ > + TPM_TerminateHandle(vtpm_globals.oiap.AuthHandle); > + > + /* Close tpmback */ > + shutdown_tpmback(); > + > + /* Close tpmfront/tpm_tis */ > + close(vtpm_globals.tpm_fd); > + > + vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager stopped.\n"); > +} >
diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index 130e4f4bf6..decf8e8b4d 100644 --- a/stubdom/vtpmmgr/init.c +++ b/stubdom/vtpmmgr/init.c @@ -503,20 +503,6 @@ egress: return status; } -void vtpmmgr_shutdown(void) -{ - /* Cleanup TPM resources */ - TPM_TerminateHandle(vtpm_globals.oiap.AuthHandle); - - /* Close tpmback */ - shutdown_tpmback(); - - /* Close tpmfront/tpm_tis */ - close(vtpm_globals.tpm_fd); - - vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager stopped.\n"); -} - /* TPM 2.0 */ static void tpm2_AuthArea_ctor(const char *authValue, UINT32 authLen, @@ -797,3 +783,17 @@ abort_egress: egress: return status; } + +void vtpmmgr_shutdown(void) +{ + /* Cleanup TPM resources */ + TPM_TerminateHandle(vtpm_globals.oiap.AuthHandle); + + /* Close tpmback */ + shutdown_tpmback(); + + /* Close tpmfront/tpm_tis */ + close(vtpm_globals.tpm_fd); + + vtpmloginfo(VTPM_LOG_VTPM, "VTPM Manager stopped.\n"); +}