Fetch the repository succeeded.
This action will force synchronization from src-openEuler/dim, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
From 3fe99160401896477f5a7c2747c9aceb15170fce Mon Sep 17 00:00:00 2001
From: Huaxin Lu <luhuaxin1@huawei.com>
Date: Mon, 29 Apr 2024 23:45:00 +0800
Subject: [PATCH 07/28] Fix the type of pcr
---
src/common/dim_measure_log.c | 4 ++--
src/common/dim_measure_log.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/common/dim_measure_log.c b/src/common/dim_measure_log.c
index b84e635..4b3bd34 100644
--- a/src/common/dim_measure_log.c
+++ b/src/common/dim_measure_log.c
@@ -272,9 +272,9 @@ int dim_measure_log_init_tree(struct dim_measure_log_tree *root,
struct dim_hash *hash,
struct dim_tpm *tpm,
unsigned int cap,
- char pcr)
+ unsigned int pcr)
{
- if (root == NULL || hash == NULL || pcr < 0)
+ if (root == NULL || hash == NULL)
return -EINVAL;
rwlock_init(&root->lock);
diff --git a/src/common/dim_measure_log.h b/src/common/dim_measure_log.h
index 6ea2361..fcf53aa 100644
--- a/src/common/dim_measure_log.h
+++ b/src/common/dim_measure_log.h
@@ -37,7 +37,7 @@ struct dim_measure_log_tree {
struct list_head list_root; /* list root for printing logs in order */
struct dim_hash *hash; /* algorithm for calculating log hash */
struct dim_tpm *tpm;
- char pcr;
+ unsigned int pcr;
rwlock_t lock;
unsigned int count; /* number of log */
unsigned int cap; /* capacity of log */
@@ -93,7 +93,7 @@ static inline bool is_same_dim_measure_log(struct dim_measure_log *x,
int dim_measure_log_init_tree(struct dim_measure_log_tree *root,
struct dim_hash *hash, struct dim_tpm *tpm,
- unsigned int cap, char pcr);
+ unsigned int cap, unsigned int pcr);
void dim_measure_log_destroy_tree(struct dim_measure_log_tree *root);
int dim_measure_log_add(struct dim_measure_log_tree *root,
const char *name_str,
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。