Skip to content

Commit

Permalink
commands: port lxc_cmd_get_init_pidfd() 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 16c5c42 commit 6d13e0f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/lxc/commands.c
Expand Up @@ -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)
Expand Down

0 comments on commit 6d13e0f

Please sign in to comment.