From 322f1aeffd30e81e8de343bc9e6bf881723e3ddf Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Mon, 14 Jan 2019 15:00:34 +0100 Subject: [PATCH] Remove name_size field from cache and core config Signed-off-by: Robert Baldyga --- inc/ocf_mngt.h | 10 ---------- src/mngt/ocf_mngt_cache.c | 2 +- src/mngt/ocf_mngt_core.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/inc/ocf_mngt.h b/inc/ocf_mngt.h index 739aae4..fac7692 100644 --- a/inc/ocf_mngt.h +++ b/inc/ocf_mngt.h @@ -40,11 +40,6 @@ struct ocf_mngt_core_config { */ const char *name; - /** - * @brief OCF core name size - */ - size_t name_size; - /** * @brief OCF cache ID number */ @@ -215,11 +210,6 @@ struct ocf_mngt_cache_config { */ const char *name; - /** - * @brief Size of cache name - */ - size_t name_size; - /** * @brief Cache mode */ diff --git a/src/mngt/ocf_mngt_cache.c b/src/mngt/ocf_mngt_cache.c index ac0a43d..c3bea95 100644 --- a/src/mngt/ocf_mngt_cache.c +++ b/src/mngt/ocf_mngt_cache.c @@ -715,7 +715,7 @@ static int _ocf_mngt_init_prepare_cache(struct ocf_cachemng_init_params *param, if (cfg->name) { ret = env_strncpy(cache_name, sizeof(cache_name), - cfg->name, cfg->name_size); + cfg->name, sizeof(cache_name)); if (ret) goto out; } else { diff --git a/src/mngt/ocf_mngt_core.c b/src/mngt/ocf_mngt_core.c index a5e1228..f855185 100644 --- a/src/mngt/ocf_mngt_core.c +++ b/src/mngt/ocf_mngt_core.c @@ -377,7 +377,7 @@ int ocf_mngt_cache_add_core_nolock(ocf_cache_t cache, ocf_core_t *core, if (cfg->name) { result = env_strncpy(core_name, sizeof(core_name), cfg->name, - cfg->name_size); + sizeof(core_name)); if (result) return result; } else {