Message ID | 20210504124842.220445-6-jandryuk@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | vtpmmgr: Some fixes - still incomplete | expand |
Jason Andryuk, le mar. 04 mai 2021 08:48:38 -0400, a ecrit: > 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> > --- > 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 c01d03e9f4..569b0dd1dc 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"); > +} > -- > 2.30.2 >
diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index c01d03e9f4..569b0dd1dc 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"); +}
Reposition vtpmmgr_shutdown so it can call flush_tpm2 without a forward declaration. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> --- stubdom/vtpmmgr/init.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)