tpm: Rename function grub_tpm_log_event to grub_tpm_measure
PATCH v2 1/1 tpm: Rename function grub_tpm_log_event to grub_tpm_measure
grub_tpm_log_event() and grub_tpm_measure() are two functions that have the same effect, so keep grub_tpm_log_event() and rename it to grub_tpm_measure(). There is also a more clear semantics.
Signed-off-by Tianjia Zhang <[email protected]>
--- grub-core/commands/efi/tpm.c | 2 +- grub-core/commands/tpm.c | 7 ------- include/grub/tpm.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-)
grub-core/commands/efi/tpm.c +1 -1
@@ -319,7 +319,7 @@ grub_tpm2_log_event (grub_efi_handle_t tpm_handle, unsigned char *buf, }grub_err_t -grub_tpm_log_event (unsigned char *buf,grub_size_t size,grub_uint8_t pcr, +grub_tpm_measure (unsigned char *buf,grub_size_t size,grub_uint8_t pcr,const char *description) {grub_efi_handle_t tpm_handle;
grub-core/commands/tpm.c +0 -7
@@ -29,13 +29,6 @@GRUB_MOD_LICENSE ("GPLv3+" ); -grub_err_t -grub_tpm_measure (unsigned char *buf,grub_size_t size,grub_uint8_t pcr, -const char *description) -{ -return grub_tpm_log_event (buf, size, pcr, description); -} - static grub_err_t grub_tpm_verify_init (grub_file_t io, enum grub_file_type type __attribute__ ((unused)),
include/grub/tpm.h +0 -2
@@ -77,6 +77,4 @@ grub_err_t grub_tpm_measure (unsigned char *buf, grub_size_t size,grub_err_t grub_tpm_init (void );grub_err_t grub_tpm_execute (PassThroughToTPM_InputParamBlock *inbuf,PassThroughToTPM_OutputParamBlock *outbuf); -grub_err_t grub_tpm_log_event (unsigned char *buf,grub_size_t size, -grub_uint8_t pcr,const char *description);#endif
Signature · 1 line
2.17.1
Quoted 5 lines · Tianjia Zhang
grub_tpm_log_event()andgrub_tpm_measure()are two functions that have the same effect, so keepgrub_tpm_log_event()and rename it togrub_tpm_measure(). There is also a more clear semantics.Signed-off-by Tianjia Zhang <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel