From: Christian Brauner Date: Thu, 25 Feb 2021 09:21:19 +0000 (+0100) Subject: commands: port lxc_cmd_get_name() to new helpers X-Git-Tag: lxc-5.0.0~267^2~21 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=16fcb1fed01d01887584c7ac4dc3c282bf6690ce;p=mirror_lxc.git commands: port lxc_cmd_get_name() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index d3944c792..ed6f49037 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1187,12 +1187,10 @@ static int lxc_cmd_get_tty_fd_callback(int fd, struct lxc_cmd_req *req, char *lxc_cmd_get_name(const char *hashed_sock_name) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_NAME, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_NAME); ret = lxc_cmd(NULL, &cmd, &stopped, NULL, hashed_sock_name); if (ret < 0)