代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dim 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f96c809dc83d8d0f44e586ccc4441e80dfe135f4 Mon Sep 17 00:00:00 2001
From: jinlun <jinlun@huawei.com>
Date: Mon, 17 Jun 2024 19:59:15 +0800
Subject: [PATCH 05/14] Maximun number of line in a modification policy
---
src/core/policy/dim_core_policy.h | 2 +-
src/core/policy/dim_core_policy_complex.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/core/policy/dim_core_policy.h b/src/core/policy/dim_core_policy.h
index 7f2c756..3b38d13 100644
--- a/src/core/policy/dim_core_policy.h
+++ b/src/core/policy/dim_core_policy.h
@@ -10,7 +10,7 @@
/* the policy filepath */
#define DIM_POLICY_PATH "/etc/dim/policy"
/* max number of lines for parsing */
-#define DIM_POLICY_LINE_MAX 10000
+#define DIM_POLICY_LINE_MAX 100000
/* measurement object of policy */
enum dim_policy_obj {
diff --git a/src/core/policy/dim_core_policy_complex.c b/src/core/policy/dim_core_policy_complex.c
index 8c02227..cba2dd7 100644
--- a/src/core/policy/dim_core_policy_complex.c
+++ b/src/core/policy/dim_core_policy_complex.c
@@ -165,7 +165,7 @@ static int policy_parse_line(char* line, int line_no, void *data)
ret = parse_line(line, policy);
if (ret < 0) {
policy_destroy(policy);
- dim_err("fail to parse policy at line %d: %d\n", line_no, ret);
+ dim_err("failed to parse policy at line %d: %d\n", line_no, ret);
return ret;
}
@@ -174,7 +174,7 @@ static int policy_parse_line(char* line, int line_no, void *data)
policy_destroy(policy);
/* ignore the repeat add */
if (ret != -EEXIST)
- dim_err("fail to add policy at line %d: %d\n", line_no, ret);
+ dim_err("failed to add policy at line %d: %d\n", line_no, ret);
return ret == -EEXIST ? 0 : ret;
}
@@ -188,4 +188,4 @@ int policy_parse_complex_format(char *buf, size_t buf_len,
return -EINVAL;
return dim_parse_line_buf(buf, buf_len, policy_parse_line, policy_add);
-}
\ No newline at end of file
+}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。