From 7208e700bb9f3376367146a31479900fda5570a7 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 25 Feb 2021 10:17:49 +0100 Subject: [PATCH] commands: port lxc_cmd_get_init_pidfd() to new helpers Signed-off-by: Christian Brauner --- src/lxc/commands.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 91d65a7f7..afbbf6abc 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -590,16 +590,10 @@ static int lxc_cmd_get_init_pid_callback(int fd, struct lxc_cmd_req *req, int lxc_cmd_get_init_pidfd(const char *name, const char *lxcpath) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_INIT_PIDFD, - }, - .rsp = { - .data = INT_TO_PTR(-EBADF), - .ret = ENOSYS, - }, - }; int pidfd, ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_INIT_PIDFD); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (ret < 0) -- 2.47.2