vtpmmgr: Print error code to aid debugging
authorJason Andryuk <jandryuk@gmail.com>
Thu, 6 May 2021 13:59:12 +0000 (09:59 -0400)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 7 May 2021 18:50:50 +0000 (19:50 +0100)
commit15a59d6ef3acdd816578eecca7a9247fd38bdf99
tree7b48ed02e1ba13a38d7c2037a9a031aeda4ef431
parent93b2558fae83ab3a6a9b48c851d48ccf57be2298
vtpmmgr: Print error code to aid debugging

tpm_get_error_name returns "Unknown Error Code" when an error string
is not defined.  In that case, we should print the Error Code so it can
be looked up offline.  tpm_get_error_name returns a const string, so
just have the two callers always print the error code so it is always
available.

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/tpm.c
stubdom/vtpmmgr/tpm2.c