Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jYrCk-000471-Oj for mharc-grub-devel@gnu.org; Wed, 13 May 2020 09:13:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYrCi-00046g-Ol for grub-devel@gnu.org; Wed, 13 May 2020 09:13:44 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:57475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYrCd-0006lN-P6 for grub-devel@gnu.org; Wed, 13 May 2020 09:13:41 -0400 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R171e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04407; MF=tianjia.zhang@linux.alibaba.com; NM=1; PH=DS; RN=2; SR=0; TI=SMTPD_---0TyROO0b_1589375610; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0TyROO0b_1589375610) by smtp.aliyun-inc.com(127.0.0.1); Wed, 13 May 2020 21:13:30 +0800 From: Tianjia Zhang To: grub-devel@gnu.org Cc: tianjia.zhang@linux.alibaba.com Subject: [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure Date: Wed, 13 May 2020 21:13:29 +0800 Message-Id: <20200513131329.52233-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Received-SPF: pass client-ip=115.124.30.43; envelope-from=tianjia.zhang@linux.alibaba.com; helo=out30-43.freemail.mail.aliyun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 09:13:32 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -98 X-Spam_score: -9.9 X-Spam_bar: --------- X-Spam_report: (-9.9 / 5.0 requ) BAYES_00=-1.9, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 13:13:44 -0000 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 --- 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