terminal: hide unnecessary symbols

parent 0e35ab88
...@@ -151,7 +151,7 @@ liblxc_la_SOURCES = af_unix.c af_unix.h \ ...@@ -151,7 +151,7 @@ liblxc_la_SOURCES = af_unix.c af_unix.h \
sync.c sync.h \ sync.c sync.h \
syscall_numbers.h \ syscall_numbers.h \
syscall_wrappers.h \ syscall_wrappers.h \
terminal.c \ terminal.c terminal.h \
utils.c utils.h \ utils.c utils.h \
uuid.c uuid.h \ uuid.c uuid.h \
version.h \ version.h \
...@@ -355,7 +355,8 @@ lxc_attach_SOURCES = tools/lxc_attach.c \ ...@@ -355,7 +355,8 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_attach_SOURCES += seccomp.c lxcseccomp.h lxc_attach_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -385,7 +386,8 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \ ...@@ -385,7 +386,8 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_autostart_SOURCES += seccomp.c lxcseccomp.h lxc_autostart_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -415,7 +417,8 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \ ...@@ -415,7 +417,8 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_cgroup_SOURCES += seccomp.c lxcseccomp.h lxc_cgroup_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -445,7 +448,8 @@ lxc_config_SOURCES = tools/lxc_config.c \ ...@@ -445,7 +448,8 @@ lxc_config_SOURCES = tools/lxc_config.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_config_SOURCES += seccomp.c lxcseccomp.h lxc_config_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -475,7 +479,8 @@ lxc_console_SOURCES = tools/lxc_console.c \ ...@@ -475,7 +479,8 @@ lxc_console_SOURCES = tools/lxc_console.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_console_SOURCES += seccomp.c lxcseccomp.h lxc_console_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -505,7 +510,8 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \ ...@@ -505,7 +510,8 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_destroy_SOURCES += seccomp.c lxcseccomp.h lxc_destroy_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -535,7 +541,8 @@ lxc_device_SOURCES = tools/lxc_device.c \ ...@@ -535,7 +541,8 @@ lxc_device_SOURCES = tools/lxc_device.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_device_SOURCES += seccomp.c lxcseccomp.h lxc_device_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -565,7 +572,8 @@ lxc_execute_SOURCES = tools/lxc_execute.c \ ...@@ -565,7 +572,8 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_execute_SOURCES += seccomp.c lxcseccomp.h lxc_execute_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -595,7 +603,8 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \ ...@@ -595,7 +603,8 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_freeze_SOURCES += seccomp.c lxcseccomp.h lxc_freeze_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -625,7 +634,8 @@ lxc_info_SOURCES = tools/lxc_info.c \ ...@@ -625,7 +634,8 @@ lxc_info_SOURCES = tools/lxc_info.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_info_SOURCES += seccomp.c lxcseccomp.h lxc_info_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -656,7 +666,8 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \ ...@@ -656,7 +666,8 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_monitor_SOURCES += seccomp.c lxcseccomp.h lxc_monitor_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -687,7 +698,8 @@ lxc_ls_SOURCES = tools/lxc_ls.c \ ...@@ -687,7 +698,8 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_ls_SOURCES += seccomp.c lxcseccomp.h lxc_ls_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -718,7 +730,8 @@ lxc_copy_SOURCES = tools/lxc_copy.c \ ...@@ -718,7 +730,8 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
state.c state.h \ state.c state.h \
storage/storage_utils.c storage/storage_utils.h \ storage/storage_utils.c storage/storage_utils.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_copy_SOURCES += seccomp.c lxcseccomp.h lxc_copy_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -748,7 +761,8 @@ lxc_start_SOURCES = tools/lxc_start.c \ ...@@ -748,7 +761,8 @@ lxc_start_SOURCES = tools/lxc_start.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_start_SOURCES += seccomp.c lxcseccomp.h lxc_start_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -778,7 +792,8 @@ lxc_stop_SOURCES = tools/lxc_stop.c \ ...@@ -778,7 +792,8 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_stop_SOURCES += seccomp.c lxcseccomp.h lxc_stop_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -808,7 +823,8 @@ lxc_top_SOURCES = tools/lxc_top.c \ ...@@ -808,7 +823,8 @@ lxc_top_SOURCES = tools/lxc_top.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_top_SOURCES += seccomp.c lxcseccomp.h lxc_top_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -838,7 +854,8 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \ ...@@ -838,7 +854,8 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_unfreeze_SOURCES += seccomp.c lxcseccomp.h lxc_unfreeze_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -870,7 +887,8 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \ ...@@ -870,7 +887,8 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h \ sync.c sync.h \
syscall_numbers.h \ syscall_numbers.h \
syscall_wrappers.h syscall_wrappers.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_unshare_SOURCES += seccomp.c lxcseccomp.h lxc_unshare_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -900,7 +918,8 @@ lxc_wait_SOURCES = tools/lxc_wait.c \ ...@@ -900,7 +918,8 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_wait_SOURCES += seccomp.c lxcseccomp.h lxc_wait_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -931,7 +950,8 @@ lxc_create_SOURCES = tools/lxc_create.c \ ...@@ -931,7 +950,8 @@ lxc_create_SOURCES = tools/lxc_create.c \
state.c state.h \ state.c state.h \
storage/storage_utils.c storage/storage_utils.h \ storage/storage_utils.c storage/storage_utils.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_create_SOURCES += seccomp.c lxcseccomp.h lxc_create_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -961,7 +981,8 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \ ...@@ -961,7 +981,8 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_snapshot_SOURCES += seccomp.c lxcseccomp.h lxc_snapshot_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -991,7 +1012,8 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \ ...@@ -991,7 +1012,8 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
start.c start.h \ start.c start.h \
state.c state.h \ state.c state.h \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h sync.c sync.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_checkpoint_SOURCES += seccomp.c lxcseccomp.h lxc_checkpoint_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -1045,6 +1067,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \ ...@@ -1045,6 +1067,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h \ sync.c sync.h \
syscall_numbers.h \ syscall_numbers.h \
terminal.c terminal.h \
utils.c utils.h utils.c utils.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_monitord_SOURCES += seccomp.c lxcseccomp.h lxc_monitord_SOURCES += seccomp.c lxcseccomp.h
...@@ -1078,7 +1101,8 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \ ...@@ -1078,7 +1101,8 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h \ sync.c sync.h \
syscall_numbers.h \ syscall_numbers.h \
syscall_wrappers.h syscall_wrappers.h \
terminal.c terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_user_nic_SOURCES += seccomp.c lxcseccomp.h lxc_user_nic_SOURCES += seccomp.c lxcseccomp.h
endif endif
...@@ -1112,6 +1136,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \ ...@@ -1112,6 +1136,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
string_utils.c string_utils.h \ string_utils.c string_utils.h \
sync.c sync.h \ sync.c sync.h \
syscall_wrappers.h \ syscall_wrappers.h \
terminal.c terminal.h \
utils.c utils.h utils.c utils.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_usernsexec_SOURCES += seccomp.c lxcseccomp.h lxc_usernsexec_SOURCES += seccomp.c lxcseccomp.h
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include "compiler.h"
#include "list.h" #include "list.h"
#include "macro.h" #include "macro.h"
#include "ringbuf.h" #include "ringbuf.h"
...@@ -98,7 +99,7 @@ struct lxc_terminal { ...@@ -98,7 +99,7 @@ struct lxc_terminal {
* indication that the console or tty is no longer in use * indication that the console or tty is no longer in use
* @ttyreq : the tty requested to be opened, -1 for any, 0 for the console * @ttyreq : the tty requested to be opened, -1 for any, 0 for the console
*/ */
extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum); __hidden extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum);
/** /**
* Create a new terminal: * Create a new terminal:
...@@ -109,19 +110,19 @@ extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum ...@@ -109,19 +110,19 @@ extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum
* - sets up SIGWINCH handler, winsz, and new terminal settings * - sets up SIGWINCH handler, winsz, and new terminal settings
* (Handlers for SIGWINCH and I/O are not registered in a mainloop.) * (Handlers for SIGWINCH and I/O are not registered in a mainloop.)
*/ */
extern int lxc_terminal_create(struct lxc_terminal *console); __hidden extern int lxc_terminal_create(struct lxc_terminal *console);
/** /**
* lxc_terminal_setup: Create a new terminal. * lxc_terminal_setup: Create a new terminal.
* - In addition to lxc_terminal_create() also sets up logging. * - In addition to lxc_terminal_create() also sets up logging.
*/ */
extern int lxc_terminal_setup(struct lxc_conf *); __hidden extern int lxc_terminal_setup(struct lxc_conf *);
/** /**
* Delete a terminal created via lxc_terminal_create() or lxc_terminal_setup(): * Delete a terminal created via lxc_terminal_create() or lxc_terminal_setup():
* Note, registered handlers are not automatically deleted. * Note, registered handlers are not automatically deleted.
*/ */
extern void lxc_terminal_delete(struct lxc_terminal *); __hidden extern void lxc_terminal_delete(struct lxc_terminal *);
/** /**
* lxc_terminal_free: mark the terminal as unallocated and free any resources * lxc_terminal_free: mark the terminal as unallocated and free any resources
...@@ -132,17 +133,17 @@ extern void lxc_terminal_delete(struct lxc_terminal *); ...@@ -132,17 +133,17 @@ extern void lxc_terminal_delete(struct lxc_terminal *);
* the terminal is no longer in use. this is used to match * the terminal is no longer in use. this is used to match
* which terminal is being freed. * which terminal is being freed.
*/ */
extern void lxc_terminal_free(struct lxc_conf *conf, int fd); __hidden extern void lxc_terminal_free(struct lxc_conf *conf, int fd);
/** /**
* Register terminal event handlers in an open mainloop. * Register terminal event handlers in an open mainloop.
*/ */
extern int lxc_terminal_mainloop_add(struct lxc_epoll_descr *, struct lxc_terminal *); __hidden extern int lxc_terminal_mainloop_add(struct lxc_epoll_descr *, struct lxc_terminal *);
/** /**
* Handle SIGWINCH events on the allocated terminals. * Handle SIGWINCH events on the allocated terminals.
*/ */
extern void lxc_terminal_sigwinch(int sig); __hidden extern void lxc_terminal_sigwinch(int sig);
/** /**
* Connect to one of the ttys given to the container via lxc.tty.max. * Connect to one of the ttys given to the container via lxc.tty.max.
...@@ -153,9 +154,8 @@ extern void lxc_terminal_sigwinch(int sig); ...@@ -153,9 +154,8 @@ extern void lxc_terminal_sigwinch(int sig);
* - registers SIGWINCH, I/O handlers in the mainloop * - registers SIGWINCH, I/O handlers in the mainloop
* - performs all necessary cleanup operations * - performs all necessary cleanup operations
*/ */
extern int lxc_console(struct lxc_container *c, int ttynum, __hidden extern int lxc_console(struct lxc_container *c, int ttynum, int stdinfd, int stdoutfd,
int stdinfd, int stdoutfd, int stderrfd, int stderrfd, int escape);
int escape);
/** /**
* Allocate one of the tty given to the container via lxc.tty.max. Returns an * Allocate one of the tty given to the container via lxc.tty.max. Returns an
...@@ -163,15 +163,14 @@ extern int lxc_console(struct lxc_container *c, int ttynum, ...@@ -163,15 +163,14 @@ extern int lxc_console(struct lxc_container *c, int ttynum,
* Set ttynum to -1 to allocate the first available tty, or to a value within * Set ttynum to -1 to allocate the first available tty, or to a value within
* the range specified by lxc.tty.max to allocate a specific tty. * the range specified by lxc.tty.max to allocate a specific tty.
*/ */
extern int lxc_terminal_getfd(struct lxc_container *c, int *ttynum, __hidden extern int lxc_terminal_getfd(struct lxc_container *c, int *ttynum, int *ptxfd);
int *ptxfd);
/** /**
* Make fd a duplicate of the standard file descriptors. The fd is made a * Make fd a duplicate of the standard file descriptors. The fd is made a
* duplicate of a specific standard file descriptor iff the standard file * duplicate of a specific standard file descriptor iff the standard file
* descriptor refers to a terminal. * descriptor refers to a terminal.
*/ */
extern int lxc_terminal_set_stdfds(int fd); __hidden extern int lxc_terminal_set_stdfds(int fd);
/** /**
* Handler for events on the stdin fd of the terminal. To be registered via the * Handler for events on the stdin fd of the terminal. To be registered via the
...@@ -179,8 +178,8 @@ extern int lxc_terminal_set_stdfds(int fd); ...@@ -179,8 +178,8 @@ extern int lxc_terminal_set_stdfds(int fd);
* lxc_terminal_mainloop_add(). * lxc_terminal_mainloop_add().
* This function exits the loop cleanly when an EPOLLHUP event is received. * This function exits the loop cleanly when an EPOLLHUP event is received.
*/ */
extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata, __hidden extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr); struct lxc_epoll_descr *descr);
/** /**
* Handler for events on the ptx fd of the terminal. To be registered via * Handler for events on the ptx fd of the terminal. To be registered via
...@@ -188,15 +187,14 @@ extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata, ...@@ -188,15 +187,14 @@ extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
* lxc_terminal_mainloop_add(). * lxc_terminal_mainloop_add().
* This function exits the loop cleanly when an EPOLLHUP event is received. * This function exits the loop cleanly when an EPOLLHUP event is received.
*/ */
extern int lxc_terminal_ptx_cb(int fd, uint32_t events, void *cbdata, __hidden extern int lxc_terminal_ptx_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr); struct lxc_epoll_descr *descr);
/** /**
* Setup new terminal properties. The old terminal settings are stored in * Setup new terminal properties. The old terminal settings are stored in
* oldtios. * oldtios.
*/ */
extern int lxc_setup_tios(int fd, struct termios *oldtios); __hidden extern int lxc_setup_tios(int fd, struct termios *oldtios);
/** /**
* lxc_terminal_winsz: propagate winsz from one terminal to another * lxc_terminal_winsz: propagate winsz from one terminal to another
...@@ -206,7 +204,7 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios); ...@@ -206,7 +204,7 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
* @dstfd * @dstfd
* - terminal to set size on (typically a ptx pty) * - terminal to set size on (typically a ptx pty)
*/ */
extern void lxc_terminal_winsz(int srcfd, int dstfd); __hidden extern void lxc_terminal_winsz(int srcfd, int dstfd);
/* /*
* lxc_terminal_signal_init: install signal handler * lxc_terminal_signal_init: install signal handler
...@@ -232,26 +230,25 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd); ...@@ -232,26 +230,25 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd);
* *
* This function allocates memory. It is up to the caller to free it. * This function allocates memory. It is up to the caller to free it.
*/ */
extern struct lxc_terminal_state *lxc_terminal_signal_init(int srcfd, int dstfd); __hidden extern struct lxc_terminal_state *lxc_terminal_signal_init(int srcfd, int dstfd);
/** /**
* Handler for signal events. To be registered via the corresponding functions * Handler for signal events. To be registered via the corresponding functions
* declared and defined in mainloop.{c,h} or lxc_terminal_mainloop_add(). * declared and defined in mainloop.{c,h} or lxc_terminal_mainloop_add().
*/ */
extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata, __hidden extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr); struct lxc_epoll_descr *descr);
extern int lxc_terminal_write_ringbuffer(struct lxc_terminal *terminal); __hidden extern int lxc_terminal_write_ringbuffer(struct lxc_terminal *terminal);
extern int lxc_terminal_create_log_file(struct lxc_terminal *terminal); __hidden extern int lxc_terminal_create_log_file(struct lxc_terminal *terminal);
extern int lxc_terminal_io_cb(int fd, uint32_t events, void *data, __hidden extern int lxc_terminal_io_cb(int fd, uint32_t events, void *data,
struct lxc_epoll_descr *descr); struct lxc_epoll_descr *descr);
extern int lxc_make_controlling_terminal(int fd); __hidden extern int lxc_make_controlling_terminal(int fd);
extern int lxc_terminal_prepare_login(int fd); __hidden extern int lxc_terminal_prepare_login(int fd);
extern void lxc_terminal_conf_free(struct lxc_terminal *terminal); __hidden extern void lxc_terminal_conf_free(struct lxc_terminal *terminal);
extern void lxc_terminal_info_init(struct lxc_terminal_info *terminal); __hidden extern void lxc_terminal_info_init(struct lxc_terminal_info *terminal);
extern void lxc_terminal_init(struct lxc_terminal *terminal); __hidden extern void lxc_terminal_init(struct lxc_terminal *terminal);
extern int lxc_terminal_map_ids(struct lxc_conf *c, __hidden extern int lxc_terminal_map_ids(struct lxc_conf *c, struct lxc_terminal *terminal);
struct lxc_terminal *terminal);
#endif /* __LXC_TERMINAL_H */ #endif /* __LXC_TERMINAL_H */
...@@ -31,7 +31,8 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \ ...@@ -31,7 +31,8 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_api_reboot_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_api_reboot_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
...@@ -61,7 +62,8 @@ lxc_test_attach_SOURCES = attach.c \ ...@@ -61,7 +62,8 @@ lxc_test_attach_SOURCES = attach.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_attach_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_attach_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
...@@ -91,7 +93,8 @@ lxc_test_cgpath_SOURCES = cgpath.c \ ...@@ -91,7 +93,8 @@ lxc_test_cgpath_SOURCES = cgpath.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_cgpath_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_cgpath_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
...@@ -123,7 +126,8 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \ ...@@ -123,7 +126,8 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_config_jump_table_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_config_jump_table_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
...@@ -176,7 +180,8 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \ ...@@ -176,7 +180,8 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_parse_config_file_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_parse_config_file_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
...@@ -229,7 +234,8 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \ ...@@ -229,7 +234,8 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \
../lxc/start.c ../lxc/start.h \ ../lxc/start.c ../lxc/start.h \
../lxc/state.c ../lxc/state.h \ ../lxc/state.c ../lxc/state.h \
../lxc/sync.c ../lxc/sync.h \ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h ../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h
if ENABLE_SECCOMP if ENABLE_SECCOMP
lxc_test_utils_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h lxc_test_utils_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif endif
......
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