commands: port lxc_get_tty_fd() to new helpers

parent ccb999b4
......@@ -1125,13 +1125,11 @@ int lxc_cmd_get_tty_fd(const char *name, int *ttynum, int *fd, const char *lxcpa
{
__do_free struct lxc_cmd_tty_rsp_data *rspdata = NULL;
bool stopped = false;
struct lxc_cmd_rr cmd = {
.req = {
.cmd = LXC_CMD_GET_TTY_FD,
.data = INT_TO_PTR(*ttynum),
},
};
int ret;
struct lxc_cmd_rr cmd;
lxc_cmd_init(&cmd, LXC_CMD_GET_TTY_FD);
lxc_cmd_data(&cmd, ENCODE_INTO_PTR_LEN, INT_TO_PTR(*ttynum));
ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
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