Skip to content

Commit

Permalink
commands: port lxc_cmd_get_cgroup_ctx() to new helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 26, 2021
1 parent 0617603 commit 3f3ba90
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/lxc/commands.c
Expand Up @@ -702,17 +702,11 @@ int lxc_cmd_get_cgroup_ctx(const char *name, const char *lxcpath,
size_t size_ret_ctx, struct cgroup_ctx *ret_ctx)
{
bool stopped = false;
struct lxc_cmd_rr cmd = {
.req = {
.cmd = LXC_CMD_GET_CGROUP_CTX,
.datalen = size_ret_ctx,
.data = ret_ctx,
},
.rsp = {
.ret = -ENOSYS,
},
};
int ret;
struct lxc_cmd_rr cmd;

lxc_cmd_init(&cmd, LXC_CMD_GET_CGROUP_CTX);
lxc_cmd_data(&cmd, size_ret_ctx, ret_ctx);

ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret < 0)
Expand Down

0 comments on commit 3f3ba90

Please sign in to comment.