代码拉取完成,页面将自动刷新
From e0703d2fc07f99c184d678d1d33ccf6fa7855d81 Mon Sep 17 00:00:00 2001
From: chenrenhui <chenrenhui1@huawei.com>
Date: Thu, 15 Aug 2024 20:29:15 +0800
Subject: [PATCH] etmem: set scan_type optional, and fix sequence of header file
Signed-off-by: chenrenhui <chenrenhui1@huawei.com>
---
etmem/inc/etmemd_inc/etmemd_thirdparty_export.h | 2 +-
etmem/src/etmemd_src/etmemd_file.c | 3 +++
etmem/src/etmemd_src/etmemd_project.c | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h b/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
index 9d145ce..6cd8094 100644
--- a/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
+++ b/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
@@ -16,8 +16,8 @@
#ifndef ETMEM_THIRDPARTY_EXPORT_H
#define ETMEM_THIRDPARTY_EXPORT_H
-#include "etmemd_project_exp.h"
#include "etmemd_engine_exp.h"
+#include "etmemd_project_exp.h"
#include "etmemd_task_exp.h"
#endif
diff --git a/etmem/src/etmemd_src/etmemd_file.c b/etmem/src/etmemd_src/etmemd_file.c
index d204685..8e739d0 100644
--- a/etmem/src/etmemd_src/etmemd_file.c
+++ b/etmem/src/etmemd_src/etmemd_file.c
@@ -22,6 +22,9 @@ static int parse_item(GKeyFile *config, char *group_name, struct config_item *it
void *val;
if (!g_key_file_has_key(config, group_name, item->key, NULL)) {
+ if (strcmp(item->key, "scan_type") == 0) {
+ return item->fill(obj, "page");
+ }
if (item->option) {
return 0;
}
diff --git a/etmem/src/etmemd_src/etmemd_project.c b/etmem/src/etmemd_src/etmemd_project.c
index d1c34f3..4990fdb 100644
--- a/etmem/src/etmemd_src/etmemd_project.c
+++ b/etmem/src/etmemd_src/etmemd_project.c
@@ -716,7 +716,7 @@ static bool check_swapcache_wmark_valid(struct project *proj)
static struct config_item g_project_config_items[] = {
{"name", STR_VAL, fill_project_name, false},
- {"scan_type", STR_VAL, fill_project_scan_type, false},
+ {"scan_type", STR_VAL, fill_project_scan_type, true},
{"sysmem_threshold", INT_VAL, fill_project_sysmem_threshold, true},
{"swapcache_high_wmark", INT_VAL, fill_project_swapcache_high_wmark, true},
{"swapcache_low_wmark", INT_VAL, fill_project_swapcache_low_wmark, true},
--
2.45.1.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。