* [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure
@ 2020-05-13 13:13 Tianjia Zhang
2020-05-13 13:42 ` Daniel Kiper
0 siblings, 1 reply; 2+ messages in thread
From: Tianjia Zhang @ 2020-05-13 13:13 UTC (permalink / raw)
To: grub-devel; +Cc: tianjia.zhang
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 <tianjia.zhang@linux.alibaba.com>
---
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(-)
diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
index 6a6cd0d83..3ea37a15e 100644
--- a/grub-core/commands/efi/tpm.c
+++ b/grub-core/commands/efi/tpm.c
@@ -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;
diff --git a/grub-core/commands/tpm.c b/grub-core/commands/tpm.c
index 1441c494d..2052c36ea 100644
--- a/grub-core/commands/tpm.c
+++ b/grub-core/commands/tpm.c
@@ -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)),
diff --git a/include/grub/tpm.h b/include/grub/tpm.h
index dfcbe8372..304507957 100644
--- a/include/grub/tpm.h
+++ b/include/grub/tpm.h
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure
2020-05-13 13:13 [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure Tianjia Zhang
@ 2020-05-13 13:42 ` Daniel Kiper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2020-05-13 13:42 UTC (permalink / raw)
To: Tianjia Zhang; +Cc: grub-devel
On Wed, May 13, 2020 at 09:13:29PM +0800, Tianjia Zhang wrote:
> 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 <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-13 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 13:13 [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure Tianjia Zhang
2020-05-13 13:42 ` Daniel Kiper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.