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
4e9c0330
Unverified
Commit
4e9c0330
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_winsz()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
9785b539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
console.c
src/lxc/console.c
+4
-4
console.h
src/lxc/console.h
+2
-2
No files found.
src/lxc/console.c
View file @
4e9c0330
...
@@ -64,7 +64,7 @@ __attribute__((constructor)) void lxc_console_init(void)
...
@@ -64,7 +64,7 @@ __attribute__((constructor)) void lxc_console_init(void)
lxc_list_init
(
&
lxc_ttys
);
lxc_list_init
(
&
lxc_ttys
);
}
}
void
lxc_
console
_winsz
(
int
srcfd
,
int
dstfd
)
void
lxc_
terminal
_winsz
(
int
srcfd
,
int
dstfd
)
{
{
int
ret
;
int
ret
;
struct
winsize
wsz
;
struct
winsize
wsz
;
...
@@ -90,7 +90,7 @@ void lxc_console_winsz(int srcfd, int dstfd)
...
@@ -90,7 +90,7 @@ void lxc_console_winsz(int srcfd, int dstfd)
static
void
lxc_console_winch
(
struct
lxc_tty_state
*
ts
)
static
void
lxc_console_winch
(
struct
lxc_tty_state
*
ts
)
{
{
lxc_
console
_winsz
(
ts
->
stdinfd
,
ts
->
masterfd
);
lxc_
terminal
_winsz
(
ts
->
stdinfd
,
ts
->
masterfd
);
if
(
ts
->
winch_proxy
)
if
(
ts
->
winch_proxy
)
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
...
@@ -677,7 +677,7 @@ static int lxc_console_peer_default(struct lxc_pty *console)
...
@@ -677,7 +677,7 @@ static int lxc_console_peer_default(struct lxc_pty *console)
goto
on_error1
;
goto
on_error1
;
}
}
lxc_
console
_winsz
(
console
->
peer
,
console
->
master
);
lxc_
terminal
_winsz
(
console
->
peer
,
console
->
master
);
console
->
tios
=
malloc
(
sizeof
(
*
console
->
tios
));
console
->
tios
=
malloc
(
sizeof
(
*
console
->
tios
));
if
(
!
console
->
tios
)
{
if
(
!
console
->
tios
)
{
...
@@ -1022,7 +1022,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
...
@@ -1022,7 +1022,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
istty
=
isatty
(
stdinfd
);
istty
=
isatty
(
stdinfd
);
if
(
istty
)
{
if
(
istty
)
{
lxc_
console
_winsz
(
stdinfd
,
masterfd
);
lxc_
terminal
_winsz
(
stdinfd
,
masterfd
);
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
}
else
{
}
else
{
INFO
(
"File descriptor %d does not refer to a tty device"
,
stdinfd
);
INFO
(
"File descriptor %d does not refer to a tty device"
,
stdinfd
);
...
...
src/lxc/console.h
View file @
4e9c0330
...
@@ -176,12 +176,12 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
...
@@ -176,12 +176,12 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
/*
/*
* lxc_
console_winsz: propag
te winsz from one terminal to another
* lxc_
terminal_winsz: propaga
te winsz from one terminal to another
*
*
* @srcfd : terminal to get size from (typically a slave pty)
* @srcfd : terminal to get size from (typically a slave pty)
* @dstfd : terminal to set size on (typically a master pty)
* @dstfd : terminal to set size on (typically a master pty)
*/
*/
extern
void
lxc_
console
_winsz
(
int
srcfd
,
int
dstfd
);
extern
void
lxc_
terminal
_winsz
(
int
srcfd
,
int
dstfd
);
/*
/*
* lxc_console_signal_init: install signal handler
* lxc_console_signal_init: install signal handler
...
...
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