diff --git a/src/swtpm_ioctl/tpm_ioctl.c b/src/swtpm_ioctl/tpm_ioctl.c index a6990b4..b2fbab8 100644 --- a/src/swtpm_ioctl/tpm_ioctl.c +++ b/src/swtpm_ioctl/tpm_ioctl.c @@ -574,6 +574,13 @@ static int do_load_state_blob(int fd, bool is_chardev, const char *blobtype, goto cleanup; } res = devtoh32(is_chardev, pss.u.resp.tpm_result); + if (res != 0) { + fprintf(stderr, + "TPM result from PTM_SET_STATEBLOB: 0x%x\n", + res); + had_error = 1; + goto cleanup; + } break; }