Skip to content

Commit

Permalink
res: ucmd-module: rename alias_cat to alias_key and alias_id to alias…
Browse files Browse the repository at this point in the history
… for sid_ucmd_dev_alias_{add,remove}
  • Loading branch information
prajnoha committed Jun 21, 2024
1 parent 3a7a374 commit 323245c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/include/resource/ucmd-module.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ sid_ucmd_dev_ready_t sid_ucmd_dev_ready_get(sid_res_t *mod_res, struct sid_ucmd_
int sid_ucmd_dev_reserved_set(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, sid_ucmd_dev_reserved_t reserved);
sid_ucmd_dev_reserved_t sid_ucmd_dev_reserved_get(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, unsigned int archive);

int sid_ucmd_dev_alias_add(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_cat, const char *alias_id);
int sid_ucmd_dev_alias_remove(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_cat, const char *alias_id);
int sid_ucmd_dev_alias_add(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_key, const char *alias);
int sid_ucmd_dev_alias_remove(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_key, const char *alias);

int sid_ucmd_grp_create(sid_res_t *mod_res,
struct sid_ucmd_ctx *ucmd_ctx,
Expand Down
16 changes: 8 additions & 8 deletions src/resource/ubridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -3234,9 +3234,9 @@ static int _handle_dev_for_group(sid_res_t *res,
return r;
}

int sid_ucmd_dev_alias_add(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_cat, const char *alias_id)
int sid_ucmd_dev_alias_add(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_key, const char *alias)
{
if (!mod_res || !ucmd_ctx || UTIL_STR_EMPTY(alias_cat) || UTIL_STR_EMPTY(alias_id))
if (!mod_res || !ucmd_ctx || UTIL_STR_EMPTY(alias_key) || UTIL_STR_EMPTY(alias))
return -EINVAL;

if (!sid_mod_reg_dep_match(mod_res, ucmd_ctx->common->block_mod_registry_res) &&
Expand All @@ -3249,15 +3249,15 @@ int sid_ucmd_dev_alias_add(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, co
NULL,
KV_KEY_DOM_ALIAS,
SID_KV_NS_MODULE,
alias_cat,
alias_id,
alias_key,
alias,
KV_OP_PLUS,
false);
}

int sid_ucmd_dev_alias_remove(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_cat, const char *alias_id)
int sid_ucmd_dev_alias_remove(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx, const char *alias_key, const char *alias)
{
if (!mod_res || !ucmd_ctx || UTIL_STR_EMPTY(alias_cat) || UTIL_STR_EMPTY(alias_id))
if (!mod_res || !ucmd_ctx || UTIL_STR_EMPTY(alias_key) || UTIL_STR_EMPTY(alias))
return -EINVAL;

if (!sid_mod_reg_dep_match(mod_res, ucmd_ctx->common->block_mod_registry_res) &&
Expand All @@ -3270,8 +3270,8 @@ int sid_ucmd_dev_alias_remove(sid_res_t *mod_res, struct sid_ucmd_ctx *ucmd_ctx,
NULL,
KV_KEY_DOM_ALIAS,
SID_KV_NS_MODULE,
alias_cat,
alias_id,
alias_key,
alias,
KV_OP_MINUS,
false);
}
Expand Down

0 comments on commit 323245c

Please sign in to comment.