From: Christian Brauner Date: Thu, 25 Feb 2021 09:24:05 +0000 (+0100) Subject: commands: port lxc_cmd_get_cgroup2_fd() to new helpers X-Git-Tag: lxc-5.0.0~267^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dab4f69fe083a8b91814bf15db249e04f81a28f5;p=thirdparty%2Flxc.git commands: port lxc_cmd_get_cgroup2_fd() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 1db7634a2..aa652be0d 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1702,15 +1702,10 @@ static int lxc_cmd_get_limit_cgroup_fd_callback(int fd, struct lxc_cmd_req *req, int lxc_cmd_get_cgroup2_fd(const char *name, const char *lxcpath) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_CGROUP2_FD, - }, - .rsp = { - .ret = -ENOSYS, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_CGROUP2_FD); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (ret < 0)