]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
commands: port lxc_cmd_get_devpts_fd() to new helpers
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 25 Feb 2021 09:18:43 +0000 (10:18 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 25 Feb 2021 11:03:26 +0000 (12:03 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/commands.c

index afbbf6abc80d0fb12ee8cd9e0f04f9404599fd0b..8bfdd821600ee33339985c34c788334779205df6 100644 (file)
@@ -627,12 +627,10 @@ static int lxc_cmd_get_init_pidfd_callback(int fd, struct lxc_cmd_req *req,
 int lxc_cmd_get_devpts_fd(const char *name, const char *lxcpath)
 {
        bool stopped = false;
-       struct lxc_cmd_rr cmd = {
-               .req = {
-                       .cmd = LXC_CMD_GET_DEVPTS_FD,
-               },
-       };
        int ret;
+       struct lxc_cmd_rr cmd;
+
+       lxc_cmd_init(&cmd, LXC_CMD_GET_DEVPTS_FD);
 
        ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
        if (ret < 0)