feat(controller-status): libxce xcecli_ctrlstatus any-node read + decode + free (task 3.1)
This commit is contained in:
parent
e56409cbd4
commit
691cd9199e
12 changed files with 285 additions and 1 deletions
|
|
@ -427,6 +427,36 @@ int xce_clusterconf(xce_ctx_t* ctx, xce_clusterconf_t** conf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int xce_ctrlstatus(xce_ctx_t* ctx, xce_ctrlstatus_t** status)
|
||||
{
|
||||
int rc, st;
|
||||
|
||||
if ((ctx == NULL) || (status == NULL)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ctx->state != XCE_CTX_RUN) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rc = xce_ctrlstatus_req(ctx->ep);
|
||||
if (rc < 0) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = cbuf_get(&(ctx->wbuf), &st);
|
||||
if (rc < 0) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (st < 0) {
|
||||
return st;
|
||||
}
|
||||
|
||||
MOVE_PTR((*status), ctx->reply.u.ctrlstatus);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xce_update_resvals(xce_ctx_t* ctx, int count, xce_resval_t** vals)
|
||||
{
|
||||
int rc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue