Add KCAS_ERR_CORE_IN_ACTIVE_STATE error code.

New error code will allow to properly handle issues caused by wrong
usage of `remove inactive core` command.
It will also allow to print meaningful error messages.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski 2021-02-17 15:48:15 +01:00
parent 2bf6e42dea
commit 760b60628c
3 changed files with 8 additions and 0 deletions

View File

@ -256,7 +256,11 @@ struct {
KCAS_ERR_CACHE_STOPPING, KCAS_ERR_CACHE_STOPPING,
"Cache being stopped" "Cache being stopped"
}, },
{
KCAS_ERR_CORE_IN_ACTIVE_STATE,
"Core device is in active state"
},
}; };

View File

@ -65,6 +65,7 @@ struct {
{ KCAS_ERR_A_PART, EINVAL }, { KCAS_ERR_A_PART, EINVAL },
{ KCAS_ERR_REMOVED_DIRTY, EIO }, { KCAS_ERR_REMOVED_DIRTY, EIO },
{ KCAS_ERR_STOPPED_DIRTY, EIO }, { KCAS_ERR_STOPPED_DIRTY, EIO },
{ KCAS_ERR_CORE_IN_ACTIVE_STATE, ENODEV },
}; };
/*******************************************/ /*******************************************/

View File

@ -589,6 +589,9 @@ enum kcas_error {
/** Cache already being stopped*/ /** Cache already being stopped*/
KCAS_ERR_CACHE_STOPPING, KCAS_ERR_CACHE_STOPPING,
/** Core device is in active state */
KCAS_ERR_CORE_IN_ACTIVE_STATE
}; };
#endif #endif