Store core name in metadata

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-07-20 14:23:30 +02:00
parent eb4272afa9
commit 259df7ace9
5 changed files with 14 additions and 29 deletions

View File

@@ -66,19 +66,11 @@ int ocf_core_get_by_name(ocf_cache_t cache, const char *name,
return -OCF_ERR_CORE_NOT_EXIST;
}
int ocf_core_set_name(ocf_core_t core, const char *src, size_t src_size)
{
OCF_CHECK_NULL(core);
OCF_CHECK_NULL(src);
return env_strncpy(core->name, OCF_CORE_NAME_SIZE - 1, src, src_size);
}
const char *ocf_core_get_name(ocf_core_t core)
{
OCF_CHECK_NULL(core);
return core->name;
return core->conf_meta->name;
}
ocf_core_state_t ocf_core_get_state(ocf_core_t core)