]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
commands: port lxc_cmd_get_clone_flags() to new helpers
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 25 Feb 2021 09:19:28 +0000 (10:19 +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 ce52fb1a33e0ba50cc456ded8a1217292419925e..3d1fd5ad2088f5cf24ba1b13d78a5b602c4a4a8a 100644 (file)
@@ -757,12 +757,10 @@ static int lxc_cmd_get_cgroup_ctx_callback(int fd, struct lxc_cmd_req *req,
 int lxc_cmd_get_clone_flags(const char *name, const char *lxcpath)
 {
        bool stopped = false;
-       struct lxc_cmd_rr cmd = {
-               .req = {
-                       .cmd = LXC_CMD_GET_CLONE_FLAGS,
-               },
-       };
        int ret;
+       struct lxc_cmd_rr cmd;
+
+       lxc_cmd_init(&cmd, LXC_CMD_GET_CLONE_FLAGS);
 
        ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
        if (ret < 0)