Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
13bb312d
Unverified
Commit
13bb312d
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: move struct lxc_terminal{_info}
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
99a04585
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
56 deletions
+53
-56
conf.h
src/lxc/conf.h
+2
-55
console.h
src/lxc/console.h
+51
-1
No files found.
src/lxc/conf.h
View file @
13bb312d
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#endif
#endif
#include <stdbool.h>
#include <stdbool.h>
#include "console.h"
#include "list.h"
#include "list.h"
#include "ringbuf.h"
#include "ringbuf.h"
#include "start.h"
/* for lxc_handler */
#include "start.h"
/* for lxc_handler */
...
@@ -134,20 +135,6 @@ struct id_map {
...
@@ -134,20 +135,6 @@ struct id_map {
};
};
/*
/*
* Defines a structure containing a pty information for
* virtualizing a tty
* @name : the path name of the slave pty side
* @master : the file descriptor of the master
* @slave : the file descriptor of the slave
*/
struct
lxc_terminal_info
{
char
name
[
MAXPATHLEN
];
int
master
;
int
slave
;
int
busy
;
};
/*
* Defines the number of tty configured and contains the
* Defines the number of tty configured and contains the
* instantiated ptys
* instantiated ptys
* @nbtty = number of configured ttys
* @nbtty = number of configured ttys
...
@@ -159,47 +146,7 @@ struct lxc_tty_info {
...
@@ -159,47 +146,7 @@ struct lxc_tty_info {
struct
lxc_tty_state
;
struct
lxc_tty_state
;
/*
/* Defines a structure to store the rootfs location, the
* Defines the structure to store the console information
* @peer : the file descriptor put/get console traffic
* @name : the file name of the slave pty
*/
struct
lxc_terminal
{
int
slave
;
int
master
;
int
peer
;
struct
lxc_terminal_info
peerpty
;
struct
lxc_epoll_descr
*
descr
;
char
*
path
;
char
name
[
MAXPATHLEN
];
struct
termios
*
tios
;
struct
lxc_tty_state
*
tty_state
;
struct
/* lxc_console_log */
{
/* size of the log file */
uint64_t
log_size
;
/* path to the log file */
char
*
log_path
;
/* fd to the log file */
int
log_fd
;
/* whether the log file will be rotated */
unsigned
int
log_rotate
;
};
struct
/* lxc_pty_ringbuf */
{
/* size of the ringbuffer */
uint64_t
buffer_size
;
/* the in-memory ringbuffer */
struct
lxc_ringbuf
ringbuf
;
};
};
/*
* Defines a structure to store the rootfs location, the
* optionals pivot_root, rootfs mount paths
* optionals pivot_root, rootfs mount paths
* @path : the rootfs source (directory or device)
* @path : the rootfs source (directory or device)
* @mount : where it is mounted
* @mount : where it is mounted
...
...
src/lxc/console.h
View file @
13bb312d
...
@@ -24,11 +24,61 @@
...
@@ -24,11 +24,61 @@
#ifndef __LXC_CONSOLE_H
#ifndef __LXC_CONSOLE_H
#define __LXC_CONSOLE_H
#define __LXC_CONSOLE_H
#include "config.h"
#include <signal.h>
#include <signal.h>
#include <stdio.h>
#include <stdio.h>
#include "conf.h"
#include "list.h"
#include "list.h"
#include "ringbuf.h"
struct
lxc_conf
;
/* Defines a structure containing a pty information for virtualizing a tty
* @name : the path name of the slave pty side
* @master : the file descriptor of the master
* @slave : the file descriptor of the slave
*/
struct
lxc_terminal_info
{
char
name
[
MAXPATHLEN
];
int
master
;
int
slave
;
int
busy
;
};
struct
lxc_terminal
{
int
slave
;
int
master
;
int
peer
;
struct
lxc_terminal_info
peerpty
;
struct
lxc_epoll_descr
*
descr
;
char
*
path
;
char
name
[
MAXPATHLEN
];
struct
termios
*
tios
;
struct
lxc_tty_state
*
tty_state
;
struct
/* lxc_console_log */
{
/* size of the log file */
uint64_t
log_size
;
/* path to the log file */
char
*
log_path
;
/* fd to the log file */
int
log_fd
;
/* whether the log file will be rotated */
unsigned
int
log_rotate
;
};
struct
/* lxc_pty_ringbuf */
{
/* size of the ringbuffer */
uint64_t
buffer_size
;
/* the in-memory ringbuffer */
struct
lxc_ringbuf
ringbuf
;
};
};
struct
lxc_epoll_descr
;
/* defined in mainloop.h */
struct
lxc_epoll_descr
;
/* defined in mainloop.h */
struct
lxc_container
;
/* defined in lxccontainer.h */
struct
lxc_container
;
/* defined in lxccontainer.h */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment