summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnsung Lee <unsung.lee@samsung.com>2024-10-24 14:46:43 +0900
committerUnsung Lee <unsung.lee@samsung.com>2024-10-31 15:08:00 +0900
commitb11beb80bd733b0a9cabd261191aa0088fb66466 (patch)
treeba89d490bdb978d05b66e065f6620899f909d26d
parente0b67c6b1f63d560d8ec1582716a9d074cefb18f (diff)
downloadresourced-b11beb80bd733b0a9cabd261191aa0088fb66466.tar.gz
resourced-b11beb80bd733b0a9cabd261191aa0088fb66466.tar.bz2
resourced-b11beb80bd733b0a9cabd261191aa0088fb66466.zip
Revert "config-parser: Support limiter.conf in limiter.conf.d"
This reverts commit e0b67c6b1f63d560d8ec1582716a9d074cefb18f. Change-Id: I91765a6b2dad9ff5bed21e5070ae60179d841f13
-rw-r--r--src/common/conf/config-parser.c28
-rw-r--r--src/common/conf/config-parser.h4
2 files changed, 2 insertions, 30 deletions
diff --git a/src/common/conf/config-parser.c b/src/common/conf/config-parser.c
index 8a314fd7..ab841391 100644
--- a/src/common/conf/config-parser.c
+++ b/src/common/conf/config-parser.c
@@ -1188,34 +1188,14 @@ static int vendor_config(struct parse_result *result, void *user_data)
return RESOURCED_ERROR_NONE;
}
-static int filter_limiter_conf_file(const struct dirent *dirent)
-{
- if (dirent == NULL)
- return 0;
-
- return strncmp(dirent->d_name, CONF_FILE_NAME(limiter),
- strlen(CONF_FILE_NAME(limiter)) + 1);
-}
-
static void load_per_vendor_configs(const char *dir, int func(struct parse_result *result,
void *user_data), void *user_data)
{
int count;
int idx;
struct dirent **namelist;
- enum config_type config_type = *((enum config_type*)user_data);
- int (*filter_func) (const struct dirent *) = NULL;
-
- switch (config_type) {
- case LIMITER_CONFIG:
- filter_func = filter_limiter_conf_file;
- break;
- default:
- filter_func = NULL;
- break;
- }
- if ((count = scandir(dir, &namelist, filter_func, alphasort)) == -1) {
+ if ((count = scandir(dir, &namelist, NULL, alphasort)) == -1) {
_I("(%s) conf dir does not exist", dir);
return;
}
@@ -1241,11 +1221,7 @@ void resourced_parse_vendor_configs(void)
fixed_app_and_service_list_init();
/* Load configurations in limiter.conf and limiter.conf.d/ */
- if (access(LIMITER_CONF_DIR_LIMITER_CONF, F_OK) != 0)
- config_parse(LIMITER_CONF_FILE, limiter_config, NULL);
- else
- config_parse(LIMITER_CONF_DIR_LIMITER_CONF, limiter_config, NULL);
-
+ config_parse(LIMITER_CONF_FILE, limiter_config, NULL);
config_type = LIMITER_CONFIG;
load_per_vendor_configs(LIMITER_CONF_DIR, vendor_config, &config_type);
diff --git a/src/common/conf/config-parser.h b/src/common/conf/config-parser.h
index df9a18d8..f7c32490 100644
--- a/src/common/conf/config-parser.h
+++ b/src/common/conf/config-parser.h
@@ -30,10 +30,6 @@ extern "C" {
#define CONF_FILE_SUFFIX ".conf"
-#define CONF_FILE_NAME(conf_name) #conf_name CONF_FILE_SUFFIX
-
-#define LIMITER_CONF_DIR_LIMITER_CONF LIMITER_CONF_DIR "/" CONF_FILE_NAME(limiter)
-
#define LIMITER_CONF_FILE RD_CONFIG_FILE(limiter)
#define OPTIMIZER_CONF_FILE RD_CONFIG_FILE(optimizer)
#define PROCESS_CONF_FILE RD_CONFIG_FILE(process)