swtpm_ioctl: print error message in case setting state blob fails

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2017-11-13 20:44:06 -05:00
parent e396140204
commit 3ca520fd1c

View File

@ -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;
}