Merge pull request #251 from arutk/fix_sample

Update sample (cache name string as array)
This commit is contained in:
Jan Musiał 2019-08-29 13:39:55 +02:00 committed by GitHub
commit a308502d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ static void simple_complete(ocf_cache_t cache, void *priv, int error)
*/
int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache)
{
struct ocf_mngt_cache_config cache_cfg = { };
struct ocf_mngt_cache_config cache_cfg = { .name = "cache1" };
struct ocf_mngt_cache_device_config device_cfg = { };
struct cache_priv *cache_priv;
struct simple_context context;
@ -106,7 +106,6 @@ int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache)
/* Cache configuration */
ocf_mngt_cache_config_set_default(&cache_cfg);
cache_cfg.metadata_volatile = true;
cache_cfg.name = "cache1";
/* Cache deivce (volume) configuration */
ocf_mngt_cache_device_config_set_default(&device_cfg);