From: Christian Brauner Date: Thu, 25 Feb 2021 09:23:50 +0000 (+0100) Subject: commands: port lxc_cmd_get_limit_cgroup_fd() to new helpers X-Git-Tag: lxc-5.0.0~267^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d7661aa6763dbc6b2883a00eb18a8b4a995a287;p=thirdparty%2Flxc.git commands: port lxc_cmd_get_limit_cgroup_fd() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index d8aa5dfd5..1db7634a2 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1637,17 +1637,11 @@ int lxc_cmd_get_limit_cgroup_fd(const char *name, const char *lxcpath, size_t size_ret_fd, struct cgroup_fd *ret_fd) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_LIMIT_CGROUP_FD, - .datalen = sizeof(struct cgroup_fd), - .data = ret_fd, - }, - .rsp = { - .ret = -ENOSYS, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_LIMIT_CGROUP_FD); + lxc_cmd_data(&cmd, sizeof(struct cgroup_fd), ret_fd); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (ret < 0)