2
0
mirror of git://github.com/lxc/lxc synced 2025-08-29 19:19:52 +00:00

tree-wide: s/lxc_epoll_descr/lxc_async_descr/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-06-04 15:13:14 +02:00
parent cff59253a0
commit 5210178135
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
13 changed files with 87 additions and 87 deletions

View File

@ -1353,7 +1353,7 @@ static int lxc_attach_terminal(const char *name, const char *lxcpath, struct lxc
}
static int lxc_attach_terminal_mainloop_init(struct lxc_terminal *terminal,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret;
@ -1395,7 +1395,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
pid_t *attached_process)
{
int ret_parent = -1;
struct lxc_epoll_descr descr = {};
struct lxc_async_descr descr = {};
int ret;
char *name, *lxcpath;
int ipc_sockets[2];

View File

@ -1927,7 +1927,7 @@ static int cg_legacy_freeze(struct cgroup_ops *ops)
}
static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
__do_free char *line = NULL;
__do_fclose FILE *f = NULL;
@ -1960,9 +1960,9 @@ static int cg_unified_freeze_do(struct cgroup_ops *ops, int timeout,
const char *wait_error)
{
__do_close int fd = -EBADF;
call_cleaner(lxc_mainloop_close) struct lxc_epoll_descr *descr_ptr = NULL;
call_cleaner(lxc_mainloop_close) struct lxc_async_descr *descr_ptr = NULL;
int ret;
struct lxc_epoll_descr descr;
struct lxc_async_descr descr;
struct hierarchy *h;
h = ops->unified;
@ -3653,9 +3653,9 @@ static int do_cgroup_freeze(int unified_fd,
const char *wait_error)
{
__do_close int events_fd = -EBADF;
call_cleaner(lxc_mainloop_close) struct lxc_epoll_descr *descr_ptr = NULL;
call_cleaner(lxc_mainloop_close) struct lxc_async_descr *descr_ptr = NULL;
int ret;
struct lxc_epoll_descr descr = {};
struct lxc_async_descr descr = {};
if (timeout != 0) {
ret = lxc_mainloop_open(&descr);

View File

@ -56,7 +56,7 @@ struct lxc_monitor {
int *clientfds;
int clientfds_size;
int clientfds_cnt;
struct lxc_epoll_descr descr;
struct lxc_async_descr descr;
};
static struct lxc_monitor monitor;
@ -137,7 +137,7 @@ static void lxc_monitord_sockfd_remove(struct lxc_monitor *mon, int fd)
}
static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_monitor *mon = data;
@ -157,7 +157,7 @@ static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
}
static int lxc_monitord_sock_accept(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret, clientfd;
struct lxc_monitor *mon = data;
@ -283,7 +283,7 @@ static void lxc_monitord_delete(struct lxc_monitor *mon)
}
static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret, i;
struct lxc_msg msglxc;

View File

@ -611,7 +611,7 @@ pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath)
static int lxc_cmd_get_init_pid_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.data = PID_TO_PTR(handler->pid),
@ -648,7 +648,7 @@ int lxc_cmd_get_init_pidfd(const char *name, const char *lxcpath)
static int lxc_cmd_get_init_pidfd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = -EBADF,
@ -688,7 +688,7 @@ int lxc_cmd_get_devpts_fd(const char *name, const char *lxcpath)
static int lxc_cmd_get_devpts_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = -EBADF,
@ -732,7 +732,7 @@ int lxc_cmd_get_seccomp_notify_fd(const char *name, const char *lxcpath)
static int lxc_cmd_get_seccomp_notify_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
#ifdef HAVE_SECCOMP_NOTIFY
struct lxc_cmd_rsp rsp = {
@ -773,7 +773,7 @@ int lxc_cmd_get_cgroup_ctx(const char *name, const char *lxcpath,
static int lxc_cmd_get_cgroup_ctx_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = EINVAL,
@ -824,7 +824,7 @@ int lxc_cmd_get_clone_flags(const char *name, const char *lxcpath)
static int lxc_cmd_get_clone_flags_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.data = INT_TO_PTR(handler->ns_clone_flags),
@ -914,7 +914,7 @@ char *lxc_cmd_get_limit_cgroup_path(const char *name, const char *lxcpath,
static int __lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
bool limiting_cgroup)
{
ssize_t ret;
@ -950,14 +950,14 @@ static int __lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req,
static int lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup_callback(fd, req, handler, descr, false);
}
static int lxc_cmd_get_limit_cgroup_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup_callback(fd, req, handler, descr, true);
}
@ -997,7 +997,7 @@ char *lxc_cmd_get_config_item(const char *name, const char *item,
static int lxc_cmd_get_config_item_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
__do_free char *cidata = NULL;
int cilen;
@ -1059,7 +1059,7 @@ int lxc_cmd_get_state(const char *name, const char *lxcpath)
static int lxc_cmd_get_state_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.data = INT_TO_PTR(handler->state),
@ -1104,7 +1104,7 @@ int lxc_cmd_stop(const char *name, const char *lxcpath)
static int lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp;
int stopsignal = SIGKILL;
@ -1155,7 +1155,7 @@ int lxc_cmd_terminal_winch(const char *name, const char *lxcpath)
static int lxc_cmd_terminal_winch_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
/* should never be called */
return syserror_set(-ENOSYS, "Called lxc_cmd_terminal_winch_callback()");
@ -1207,7 +1207,7 @@ int lxc_cmd_get_tty_fd(const char *name, int *ttynum, int *fd, const char *lxcpa
static int lxc_cmd_get_tty_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = -EBADF,
@ -1258,7 +1258,7 @@ char *lxc_cmd_get_name(const char *hashed_sock_name)
static int lxc_cmd_get_name_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp;
@ -1298,7 +1298,7 @@ char *lxc_cmd_get_lxcpath(const char *hashed_sock_name)
static int lxc_cmd_get_lxcpath_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = 0,
@ -1351,7 +1351,7 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath,
static int lxc_cmd_add_state_client_callback(__owns int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = -EINVAL,
@ -1403,7 +1403,7 @@ int lxc_cmd_add_bpf_device_cgroup(const char *name, const char *lxcpath,
static int lxc_cmd_add_bpf_device_cgroup_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {
.ret = -EINVAL,
@ -1470,7 +1470,7 @@ int lxc_cmd_console_log(const char *name, const char *lxcpath,
static int lxc_cmd_console_log_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp;
uint64_t buffer_size = handler->conf->console.buffer_size;
@ -1526,7 +1526,7 @@ int lxc_cmd_serve_state_clients(const char *name, const char *lxcpath,
static int lxc_cmd_serve_state_clients_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret;
lxc_state_t state = PTR_TO_INT(req->data);
@ -1566,7 +1566,7 @@ int lxc_cmd_seccomp_notify_add_listener(const char *name, const char *lxcpath,
static int lxc_cmd_seccomp_notify_add_listener_callback(int fd,
struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_cmd_rsp rsp = {0};
@ -1621,7 +1621,7 @@ int lxc_cmd_freeze(const char *name, const char *lxcpath, int timeout)
static int lxc_cmd_freeze_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int timeout = PTR_TO_INT(req->data);
struct lxc_cmd_rsp rsp = {
@ -1653,7 +1653,7 @@ int lxc_cmd_unfreeze(const char *name, const char *lxcpath, int timeout)
static int lxc_cmd_unfreeze_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int timeout = PTR_TO_INT(req->data);
struct lxc_cmd_rsp rsp = {
@ -1713,7 +1713,7 @@ int lxc_cmd_get_limit_cgroup_fd(const char *name, const char *lxcpath,
static int __lxc_cmd_get_cgroup_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
bool limit)
{
struct lxc_cmd_rsp rsp = {
@ -1745,14 +1745,14 @@ static int __lxc_cmd_get_cgroup_fd_callback(int fd, struct lxc_cmd_req *req,
static int lxc_cmd_get_cgroup_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup_fd_callback(fd, req, handler, descr, false);
}
static int lxc_cmd_get_limit_cgroup_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup_fd_callback(fd, req, handler, descr, true);
}
@ -1809,7 +1809,7 @@ int lxc_cmd_get_limit_cgroup2_fd(const char *name, const char *lxcpath)
static int __lxc_cmd_get_cgroup2_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
bool limiting_cgroup)
{
struct lxc_cmd_rsp rsp = {
@ -1835,14 +1835,14 @@ static int __lxc_cmd_get_cgroup2_fd_callback(int fd, struct lxc_cmd_req *req,
static int lxc_cmd_get_cgroup2_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup2_fd_callback(fd, req, handler, descr, false);
}
static int lxc_cmd_get_limit_cgroup2_fd_callback(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return __lxc_cmd_get_cgroup2_fd_callback(fd, req, handler, descr, true);
}
@ -1859,10 +1859,10 @@ static int lxc_cmd_rsp_send_enosys(int fd, int id)
static int lxc_cmd_process(int fd, struct lxc_cmd_req *req,
struct lxc_handler *handler,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
typedef int (*callback)(int, struct lxc_cmd_req *, struct lxc_handler *,
struct lxc_epoll_descr *);
struct lxc_async_descr *);
callback cb[LXC_CMD_MAX] = {
[LXC_CMD_GET_TTY_FD] = lxc_cmd_get_tty_fd_callback,
@ -1900,7 +1900,7 @@ static int lxc_cmd_process(int fd, struct lxc_cmd_req *req,
}
static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
struct lxc_epoll_descr *descr, const lxc_cmd_t cmd)
struct lxc_async_descr *descr, const lxc_cmd_t cmd)
{
lxc_terminal_free(handler->conf, fd);
lxc_mainloop_del_handler(descr, fd);
@ -1945,7 +1945,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
}
static int lxc_cmd_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
__do_free void *reqdata = NULL;
int ret;
@ -2012,7 +2012,7 @@ out_close:
}
static int lxc_cmd_accept(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
__do_close int connection = -EBADF;
int opt = 1, ret = -1;
@ -2063,7 +2063,7 @@ int lxc_server_init(const char *name, const char *lxcpath, const char *suffix)
return log_trace(move_fd(fd), "Created abstract unix socket \"%s\"", &path[1]);
}
int lxc_cmd_mainloop_add(const char *name, struct lxc_epoll_descr *descr,
int lxc_cmd_mainloop_add(const char *name, struct lxc_async_descr *descr,
struct lxc_handler *handler)
{
int ret;

View File

@ -137,11 +137,11 @@ __hidden __access_r_nosize(3) extern int lxc_cmd_add_state_client(const char *na
__hidden extern int lxc_cmd_serve_state_clients(const char *name, const char *lxcpath,
lxc_state_t state);
struct lxc_epoll_descr;
struct lxc_async_descr;
struct lxc_handler;
__hidden extern int lxc_server_init(const char *name, const char *lxcpath, const char *suffix);
__hidden extern int lxc_cmd_mainloop_add(const char *name, struct lxc_epoll_descr *descr,
__hidden extern int lxc_cmd_mainloop_add(const char *name, struct lxc_async_descr *descr,
struct lxc_handler *handler);
__hidden extern int lxc_try_cmd(const char *name, const char *lxcpath);
__hidden extern int lxc_cmd_console_log(const char *name, const char *lxcpath,

View File

@ -22,7 +22,7 @@
#include "memory_utils.h"
struct lxc_conf;
struct lxc_epoll_descr;
struct lxc_async_descr;
struct lxc_handler;
#ifndef SECCOMP_FILTER_FLAG_NEW_LISTENER
@ -82,10 +82,10 @@ __hidden extern int lxc_seccomp_load(struct lxc_conf *conf);
__hidden extern int lxc_read_seccomp_config(struct lxc_conf *conf);
__hidden extern void lxc_seccomp_free(struct lxc_seccomp *seccomp);
__hidden extern int seccomp_notify_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
__hidden extern void seccomp_conf_init(struct lxc_conf *conf);
__hidden extern int lxc_seccomp_setup_proxy(struct lxc_seccomp *seccomp,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
struct lxc_handler *handler);
__hidden extern int lxc_seccomp_send_notifier_fd(struct lxc_seccomp *seccomp, int socket_fd);
__hidden extern int lxc_seccomp_recv_notifier_fd(struct lxc_seccomp *seccomp, int socket_fd);
@ -131,7 +131,7 @@ static inline void lxc_seccomp_free(struct lxc_seccomp *seccomp)
}
static inline int seccomp_notify_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
return -ENOSYS;
}
@ -141,7 +141,7 @@ static inline void seccomp_conf_init(struct lxc_conf *conf)
}
static inline int lxc_seccomp_setup_proxy(struct lxc_seccomp *seccomp,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
struct lxc_handler *handler)
{
return 0;

View File

@ -22,7 +22,7 @@ struct mainloop_handler {
#define MAX_EVENTS 10
int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms)
int lxc_mainloop(struct lxc_async_descr *descr, int timeout_ms)
{
int i, nfds, ret;
struct mainloop_handler *handler;
@ -59,7 +59,7 @@ int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms)
}
}
int lxc_mainloop_add_handler_events(struct lxc_epoll_descr *descr, int fd,
int lxc_mainloop_add_handler_events(struct lxc_async_descr *descr, int fd,
int events,
lxc_mainloop_callback_t callback,
void *data)
@ -94,14 +94,14 @@ int lxc_mainloop_add_handler_events(struct lxc_epoll_descr *descr, int fd,
return 0;
}
int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd,
int lxc_mainloop_add_handler(struct lxc_async_descr *descr, int fd,
lxc_mainloop_callback_t callback, void *data)
{
return lxc_mainloop_add_handler_events(descr, fd, EPOLLIN, callback,
data);
}
int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd)
int lxc_mainloop_del_handler(struct lxc_async_descr *descr, int fd)
{
struct mainloop_handler *handler;
struct lxc_list *iterator;
@ -124,7 +124,7 @@ int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd)
return ret_errno(EINVAL);
}
int lxc_mainloop_open(struct lxc_epoll_descr *descr)
int lxc_mainloop_open(struct lxc_async_descr *descr)
{
descr->epfd = epoll_create1(EPOLL_CLOEXEC);
if (descr->epfd < 0)
@ -134,7 +134,7 @@ int lxc_mainloop_open(struct lxc_epoll_descr *descr)
return 0;
}
void lxc_mainloop_close(struct lxc_epoll_descr *descr)
void lxc_mainloop_close(struct lxc_async_descr *descr)
{
struct lxc_list *iterator, *next;

View File

@ -13,27 +13,27 @@
#define LXC_MAINLOOP_CONTINUE 0
#define LXC_MAINLOOP_CLOSE 1
struct lxc_epoll_descr {
struct lxc_async_descr {
int epfd;
struct lxc_list handlers;
};
typedef int (*lxc_mainloop_callback_t)(int fd, uint32_t event, void *data,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
__hidden extern int lxc_mainloop(struct lxc_epoll_descr *descr, int timeout_ms);
__hidden extern int lxc_mainloop(struct lxc_async_descr *descr, int timeout_ms);
__hidden extern int lxc_mainloop_add_handler_events(struct lxc_epoll_descr *descr, int fd, int events,
__hidden extern int lxc_mainloop_add_handler_events(struct lxc_async_descr *descr, int fd, int events,
lxc_mainloop_callback_t callback, void *data);
__hidden extern int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd,
__hidden extern int lxc_mainloop_add_handler(struct lxc_async_descr *descr, int fd,
lxc_mainloop_callback_t callback, void *data);
__hidden extern int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd);
__hidden extern int lxc_mainloop_del_handler(struct lxc_async_descr *descr, int fd);
__hidden extern int lxc_mainloop_open(struct lxc_epoll_descr *descr);
__hidden extern int lxc_mainloop_open(struct lxc_async_descr *descr);
__hidden extern void lxc_mainloop_close(struct lxc_epoll_descr *descr);
__hidden extern void lxc_mainloop_close(struct lxc_async_descr *descr);
define_cleanup_function(struct lxc_epoll_descr *, lxc_mainloop_close);
define_cleanup_function(struct lxc_async_descr *, lxc_mainloop_close);
#endif

View File

@ -1359,7 +1359,7 @@ static void seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
#endif
int seccomp_notify_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
#if HAVE_DECL_SECCOMP_NOTIFY_FD
@ -1566,7 +1566,7 @@ void seccomp_conf_init(struct lxc_conf *conf)
}
int lxc_seccomp_setup_proxy(struct lxc_seccomp *seccomp,
struct lxc_epoll_descr *descr,
struct lxc_async_descr *descr,
struct lxc_handler *handler)
{
#if HAVE_DECL_SECCOMP_NOTIFY_FD

View File

@ -378,7 +378,7 @@ static int setup_signal_fd(sigset_t *oldmask)
}
static int signal_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret;
siginfo_t info;
@ -577,7 +577,7 @@ int lxc_poll(const char *name, struct lxc_handler *handler)
{
int ret;
bool has_console = true;
struct lxc_epoll_descr descr, descr_console;
struct lxc_async_descr descr, descr_console;
if (handler->conf->console.path &&
strequal(handler->conf->console.path, "none"))

View File

@ -69,7 +69,7 @@ static void lxc_terminal_winch(struct lxc_terminal_state *ts)
}
int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
ssize_t ret;
struct signalfd_siginfo siginfo;
@ -329,7 +329,7 @@ static int lxc_terminal_write_log_file(struct lxc_terminal *terminal, char *buf,
}
int lxc_terminal_io_cb(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
struct lxc_terminal *terminal = data;
char buf[LXC_TERMINAL_BUFFER_SIZE];
@ -411,7 +411,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_terminal *terminal)
return 0;
}
int lxc_terminal_mainloop_add(struct lxc_epoll_descr *descr,
int lxc_terminal_mainloop_add(struct lxc_async_descr *descr,
struct lxc_terminal *terminal)
{
int ret;
@ -1116,7 +1116,7 @@ int lxc_terminal_set_stdfds(int fd)
}
int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int ret;
char c;
@ -1150,7 +1150,7 @@ int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
}
int lxc_terminal_ptx_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
int r, w;
char buf[LXC_TERMINAL_BUFFER_SIZE];
@ -1180,7 +1180,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
int escape)
{
int ptxfd, ret, ttyfd;
struct lxc_epoll_descr descr;
struct lxc_async_descr descr;
struct termios oldtios;
struct lxc_terminal_state *ts;
struct lxc_terminal terminal = {

View File

@ -13,7 +13,7 @@
struct lxc_container;
struct lxc_conf;
struct lxc_epoll_descr;
struct lxc_async_descr;
struct lxc_terminal_info {
/* the path name of the pty side */
@ -63,7 +63,7 @@ struct lxc_terminal {
int ptx;
int peer;
struct lxc_terminal_info proxy;
struct lxc_epoll_descr *descr;
struct lxc_async_descr *descr;
char *path;
char name[PATH_MAX];
struct termios *tios;
@ -141,7 +141,7 @@ __hidden extern void lxc_terminal_free(struct lxc_conf *conf, int fd);
/**
* Register terminal event handlers in an open mainloop.
*/
__hidden extern int lxc_terminal_mainloop_add(struct lxc_epoll_descr *, struct lxc_terminal *);
__hidden extern int lxc_terminal_mainloop_add(struct lxc_async_descr *, struct lxc_terminal *);
/**
* Handle SIGWINCH events on the allocated terminals.
@ -182,7 +182,7 @@ __hidden extern int lxc_terminal_set_stdfds(int fd);
* This function exits the loop cleanly when an EPOLLHUP event is received.
*/
__hidden extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
/**
* Handler for events on the ptx fd of the terminal. To be registered via
@ -191,7 +191,7 @@ __hidden extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
* This function exits the loop cleanly when an EPOLLHUP event is received.
*/
__hidden extern int lxc_terminal_ptx_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
/**
* Setup new terminal properties. The old terminal settings are stored in
@ -240,12 +240,12 @@ __hidden extern struct lxc_terminal_state *lxc_terminal_signal_init(int srcfd, i
* declared and defined in mainloop.{c,h} or lxc_terminal_mainloop_add().
*/
__hidden extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
__hidden extern int lxc_terminal_write_ringbuffer(struct lxc_terminal *terminal);
__hidden extern int lxc_terminal_create_log_file(struct lxc_terminal *terminal);
__hidden extern int lxc_terminal_io_cb(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr);
struct lxc_async_descr *descr);
__hidden extern int lxc_make_controlling_terminal(int fd);
__hidden extern int lxc_terminal_prepare_login(int fd);

View File

@ -549,7 +549,7 @@ static void ct_realloc(int active_cnt)
}
static int stdin_handler(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr)
struct lxc_async_descr *descr)
{
char *in_char = data;
@ -569,7 +569,7 @@ static int stdin_handler(int fd, uint32_t events, void *data,
int main(int argc, char *argv[])
{
struct lxc_epoll_descr descr;
struct lxc_async_descr descr;
int ret, ct_print_cnt;
char in_char;