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
c1ee47cd
Unverified
Commit
c1ee47cd
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_allocate()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
93ed4990
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
commands.c
src/lxc/commands.c
+1
-1
console.c
src/lxc/console.c
+2
-2
console.h
src/lxc/console.h
+3
-3
No files found.
src/lxc/commands.c
View file @
c1ee47cd
...
...
@@ -748,7 +748,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req,
struct
lxc_cmd_rsp
rsp
;
int
ttynum
=
PTR_TO_INT
(
req
->
data
);
masterfd
=
lxc_
console
_allocate
(
handler
->
conf
,
fd
,
&
ttynum
);
masterfd
=
lxc_
terminal
_allocate
(
handler
->
conf
,
fd
,
&
ttynum
);
if
(
masterfd
<
0
)
goto
out_close
;
...
...
src/lxc/console.c
View file @
c1ee47cd
...
...
@@ -451,7 +451,7 @@ int lxc_terminal_mainloop_add(struct lxc_epoll_descr *descr,
}
/* We cache the descr so that we can add an fd to it when someone
* does attach to it in lxc_
console
_allocate().
* does attach to it in lxc_
terminal
_allocate().
*/
console
->
descr
=
descr
;
ret
=
lxc_terminal_mainloop_add_peer
(
console
);
...
...
@@ -575,7 +575,7 @@ err1:
return
-
1
;
}
int
lxc_
console
_allocate
(
struct
lxc_conf
*
conf
,
int
sockfd
,
int
*
ttyreq
)
int
lxc_
terminal
_allocate
(
struct
lxc_conf
*
conf
,
int
sockfd
,
int
*
ttyreq
)
{
int
masterfd
=
-
1
,
ttynum
;
struct
lxc_tty_info
*
tty_info
=
&
conf
->
tty_info
;
...
...
src/lxc/console.h
View file @
c1ee47cd
...
...
@@ -61,14 +61,14 @@ struct lxc_tty_state
};
/*
* lxc_
console
_allocate: allocate the console or a tty
* lxc_
terminal
_allocate: allocate the console or a tty
*
* @conf : the configuration of the container to allocate from
* @sockfd : the socket fd whose remote side when closed, will be an
* 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
*/
extern
int
lxc_
console
_allocate
(
struct
lxc_conf
*
conf
,
int
sockfd
,
int
*
ttynum
);
extern
int
lxc_
terminal
_allocate
(
struct
lxc_conf
*
conf
,
int
sockfd
,
int
*
ttynum
);
/*
* Create a new pty:
...
...
@@ -102,7 +102,7 @@ extern void lxc_console_delete(struct lxc_pty *);
/*
* lxc_console_free: mark the console or a tty as unallocated, free any
* resources allocated by lxc_
console
_allocate().
* resources allocated by lxc_
terminal
_allocate().
*
* @conf : the configuration of the container whose tty was closed
* @fd : the socket fd whose remote side was closed, which indicated
...
...
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