Projects
Eulaceura:Mainline:GA
dim
_service:obs_scm:backport-Maximun-number-of-lin...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-Maximun-number-of-line-in-a-modification-policy.patch of Package dim
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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2