commands: port lxc_cmd_freeze() to new helpers

parent 6e662117
...@@ -1552,13 +1552,11 @@ out: ...@@ -1552,13 +1552,11 @@ out:
int lxc_cmd_freeze(const char *name, const char *lxcpath, int timeout) int lxc_cmd_freeze(const char *name, const char *lxcpath, int timeout)
{ {
bool stopped = false; bool stopped = false;
struct lxc_cmd_rr cmd = {
.req = {
.cmd = LXC_CMD_FREEZE,
.data = INT_TO_PTR(timeout),
},
};
int ret; int ret;
struct lxc_cmd_rr cmd;
lxc_cmd_init(&cmd, LXC_CMD_FREEZE);
lxc_cmd_data(&cmd, ENCODE_INTO_PTR_LEN, INT_TO_PTR(timeout));
ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret <= 0 || cmd.rsp.ret < 0) if (ret <= 0 || cmd.rsp.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