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
1560f6c9
Commit
1560f6c9
authored
Feb 24, 2010
by
Daniel Lezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix no rootfs no console
When there is no rootfs, don't create a console. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
e0dc0de7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
console.c
src/lxc/console.c
+10
-1
console.h
src/lxc/console.h
+1
-1
start.c
src/lxc/start.c
+1
-1
No files found.
src/lxc/console.c
View file @
1560f6c9
...
...
@@ -139,9 +139,13 @@ out_close:
return
1
;
}
int
lxc_create_console
(
struct
lxc_con
sole
*
console
)
int
lxc_create_console
(
struct
lxc_con
f
*
conf
)
{
struct
termios
tios
;
struct
lxc_console
*
console
=
&
conf
->
console
;
if
(
!
conf
->
rootfs
)
return
0
;
if
(
openpty
(
&
console
->
master
,
&
console
->
slave
,
console
->
name
,
NULL
,
NULL
))
{
...
...
@@ -239,6 +243,11 @@ int lxc_console_mainloop_add(struct lxc_epoll_descr *descr,
struct
lxc_conf
*
conf
=
handler
->
conf
;
struct
lxc_console
*
console
=
&
conf
->
console
;
if
(
!
conf
->
rootfs
)
{
INFO
(
"no rootfs, no console."
);
return
0
;
}
if
(
lxc_mainloop_add_handler
(
descr
,
console
->
master
,
console_handler
,
console
))
{
ERROR
(
"failed to add to mainloop console handler for '%d'"
,
...
...
src/lxc/console.h
View file @
1560f6c9
...
...
@@ -21,6 +21,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
extern
int
lxc_create_console
(
struct
lxc_con
sole
*
);
extern
int
lxc_create_console
(
struct
lxc_con
f
*
);
extern
void
lxc_delete_console
(
struct
lxc_console
*
);
extern
int
lxc_console_mainloop_add
(
struct
lxc_epoll_descr
*
,
struct
lxc_handler
*
);
src/lxc/start.c
View file @
1560f6c9
...
...
@@ -207,7 +207,7 @@ struct lxc_handler *lxc_init(const char *name, struct lxc_conf *conf)
goto
out_aborting
;
}
if
(
lxc_create_console
(
&
conf
->
console
))
{
if
(
lxc_create_console
(
conf
))
{
ERROR
(
"failed to create console"
);
goto
out_delete_tty
;
}
...
...
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