Skip to content

Commit

Permalink
commands: port lxc_cmd_seccomp_notify_add_listener() to new helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 26, 2021
1 parent cca8af9 commit 14f3459
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lxc/commands.c
Expand Up @@ -1493,13 +1493,11 @@ int lxc_cmd_seccomp_notify_add_listener(const char *name, const char *lxcpath,

#ifdef HAVE_SECCOMP_NOTIFY
bool stopped = false;
struct lxc_cmd_rr cmd = {
.req = {
.cmd = LXC_CMD_SECCOMP_NOTIFY_ADD_LISTENER,
.data = INT_TO_PTR(fd),
},
};
int ret;
struct lxc_cmd_rr cmd;

lxc_cmd_init(&cmd, LXC_CMD_SECCOMP_NOTIFY_ADD_LISTENER);
lxc_cmd_data(&cmd, ENCODE_INTO_PTR_LEN, INT_TO_PTR(fd));

ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret < 0)
Expand Down

0 comments on commit 14f3459

Please sign in to comment.