]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tpm: Rename function grub_tpm_log_event() to grub_tpm_measure()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Wed, 13 May 2020 13:13:29 +0000 (21:13 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 15 May 2020 13:37:28 +0000 (15:37 +0200)
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(). This way we get also a more clear semantics.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/efi/tpm.c
grub-core/commands/tpm.c
include/grub/tpm.h

index 6a6cd0d83c2df04a642fb0f1f8f29e4401f3c464..3ea37a15e40d79fdb52adf21117cbd24a56aab9c 100644 (file)
@@ -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;
index 1441c494d819f5e93654c5d499c4a1e342b9dcde..2052c36eaba5b2f52814426b93afb4c9954472cf 100644 (file)
 
 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)),
index dfcbe8372713c359e9cb54045312e5900c98b86d..30450795763713591edacbb34e65c27b8e9eb3fb 100644 (file)
@@ -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