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
43366ca2
Unverified
Commit
43366ca2
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_create_log_file()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
9bc78083
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
commands.c
src/lxc/commands.c
+1
-2
console.c
src/lxc/console.c
+2
-2
console.h
src/lxc/console.h
+1
-1
No files found.
src/lxc/commands.c
View file @
43366ca2
...
@@ -991,8 +991,7 @@ static int lxc_cmd_console_log_callback(int fd, struct lxc_cmd_req *req,
...
@@ -991,8 +991,7 @@ static int lxc_cmd_console_log_callback(int fd, struct lxc_cmd_req *req,
rsp
.
ret
=
0
;
rsp
.
ret
=
0
;
if
(
log
->
clear
)
if
(
log
->
clear
)
/* clear the ringbuffer */
lxc_ringbuf_clear
(
buf
);
/* clear the ringbuffer */
lxc_ringbuf_clear
(
buf
);
else
if
(
rsp
.
datalen
>
0
)
else
if
(
rsp
.
datalen
>
0
)
lxc_ringbuf_move_read_addr
(
buf
,
rsp
.
datalen
);
lxc_ringbuf_move_read_addr
(
buf
,
rsp
.
datalen
);
...
...
src/lxc/console.c
View file @
43366ca2
...
@@ -822,7 +822,7 @@ static int lxc_terminal_create_ringbuf(struct lxc_pty *console)
...
@@ -822,7 +822,7 @@ static int lxc_terminal_create_ringbuf(struct lxc_pty *console)
* This is the console log file. Please note that the console log file is
* This is the console log file. Please note that the console log file is
* (implementation wise not content wise) independent of the console ringbuffer.
* (implementation wise not content wise) independent of the console ringbuffer.
*/
*/
int
lxc_
console
_create_log_file
(
struct
lxc_pty
*
console
)
int
lxc_
terminal
_create_log_file
(
struct
lxc_pty
*
console
)
{
{
if
(
!
console
->
log_path
)
if
(
!
console
->
log_path
)
return
0
;
return
0
;
...
@@ -889,7 +889,7 @@ int lxc_console_create(struct lxc_conf *conf)
...
@@ -889,7 +889,7 @@ int lxc_console_create(struct lxc_conf *conf)
return
-
1
;
return
-
1
;
/* create console log file */
/* create console log file */
ret
=
lxc_
console
_create_log_file
(
console
);
ret
=
lxc_
terminal
_create_log_file
(
console
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
err
;
goto
err
;
...
...
src/lxc/console.h
View file @
43366ca2
...
@@ -228,7 +228,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
...
@@ -228,7 +228,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
extern
void
lxc_terminal_signal_fini
(
struct
lxc_tty_state
*
ts
);
extern
void
lxc_terminal_signal_fini
(
struct
lxc_tty_state
*
ts
);
extern
int
lxc_terminal_write_ringbuffer
(
struct
lxc_pty
*
console
);
extern
int
lxc_terminal_write_ringbuffer
(
struct
lxc_pty
*
console
);
extern
int
lxc_
console
_create_log_file
(
struct
lxc_pty
*
console
);
extern
int
lxc_
terminal
_create_log_file
(
struct
lxc_pty
*
console
);
extern
int
lxc_terminal_io_cb
(
int
fd
,
uint32_t
events
,
void
*
data
,
extern
int
lxc_terminal_io_cb
(
int
fd
,
uint32_t
events
,
void
*
data
,
struct
lxc_epoll_descr
*
descr
);
struct
lxc_epoll_descr
*
descr
);
...
...
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