commands: port lxc_cmd_get_init_pidfd() to new helpers

parent 16c5c428
...@@ -590,16 +590,10 @@ static int lxc_cmd_get_init_pid_callback(int fd, struct lxc_cmd_req *req, ...@@ -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) int lxc_cmd_get_init_pidfd(const char *name, const char *lxcpath)
{ {
bool stopped = false; 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; 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); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment