tpm-sysfs.c (f4d916b72feafd70967994f4f5a5d7f371a77ba0) | tpm-sysfs.c (d4a317563207163ddcf677e5965ffc56ef073514) |
---|---|
1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Authors: 4 * Leendert van Doorn <leendert@watson.ibm.com> 5 * Dave Safford <safford@watson.ibm.com> 6 * Reiner Sailer <sailer@watson.ibm.com> 7 * Kylene Hall <kjhall@us.ibm.com> 8 * --- 100 unchanged lines hidden (view full) --- 109 rc = tpm1_getcap(chip, TPM_CAP_PROP_PCR, &cap, 110 "attempting to determine the number of PCRS", 111 sizeof(cap.num_pcrs)); 112 if (rc) 113 return 0; 114 115 num_pcrs = be32_to_cpu(cap.num_pcrs); 116 for (i = 0; i < num_pcrs; i++) { | 1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Authors: 4 * Leendert van Doorn <leendert@watson.ibm.com> 5 * Dave Safford <safford@watson.ibm.com> 6 * Reiner Sailer <sailer@watson.ibm.com> 7 * Kylene Hall <kjhall@us.ibm.com> 8 * --- 100 unchanged lines hidden (view full) --- 109 rc = tpm1_getcap(chip, TPM_CAP_PROP_PCR, &cap, 110 "attempting to determine the number of PCRS", 111 sizeof(cap.num_pcrs)); 112 if (rc) 113 return 0; 114 115 num_pcrs = be32_to_cpu(cap.num_pcrs); 116 for (i = 0; i < num_pcrs; i++) { |
117 rc = tpm_pcr_read_dev(chip, i, digest); | 117 rc = tpm1_pcr_read_dev(chip, i, digest); |
118 if (rc) 119 break; 120 str += sprintf(str, "PCR-%02d: ", i); 121 for (j = 0; j < TPM_DIGEST_SIZE; j++) 122 str += sprintf(str, "%02X ", digest[j]); 123 str += sprintf(str, "\n"); 124 } 125 return str - buf; --- 194 unchanged lines hidden --- | 118 if (rc) 119 break; 120 str += sprintf(str, "PCR-%02d: ", i); 121 for (j = 0; j < TPM_DIGEST_SIZE; j++) 122 str += sprintf(str, "%02X ", digest[j]); 123 str += sprintf(str, "\n"); 124 } 125 return str - buf; --- 194 unchanged lines hidden --- |