代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dim 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。