Skip to content

Commit

Permalink
testing: Add some debugging output into swtpm_ioctl's -h path
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanberger committed Jan 17, 2020
1 parent 930c7ba commit 961a1e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/swtpm_ioctl/tpm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,10 @@ int main(int argc, char *argv[])

} else if (!strcmp(command, "-h")) {
if (do_hash_start_data_end(fd, is_chardev, hashdata)) {
fprintf(stderr, "hashing failed\n");
goto exit;
}

fprintf(stderr, "hashing succeeded\n");
} else if (!strcmp(command, "-C")) {
n = ctrlcmd(fd, PTM_CANCEL_TPM_CMD, &res, 0, sizeof(res));
if (n < 0) {
Expand Down Expand Up @@ -1231,5 +1232,10 @@ int main(int argc, char *argv[])

exit:
free(tcp_hostname);

if (command && !strcmp(command, "-h")) {
fprintf(stderr, "Exiting with ret=%d\n", ret);
}

return ret;
}

0 comments on commit 961a1e9

Please sign in to comment.