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
468724d3
Unverified
Commit
468724d3
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminal: lxc_terminal_rotate_log_file()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
fb87aa6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
terminal.c
src/lxc/terminal.c
+2
-2
No files found.
src/lxc/terminal.c
View file @
468724d3
...
@@ -213,7 +213,7 @@ static int lxc_terminal_truncate_log_file(struct lxc_terminal *terminal)
...
@@ -213,7 +213,7 @@ static int lxc_terminal_truncate_log_file(struct lxc_terminal *terminal)
return
lxc_unpriv
(
ftruncate
(
terminal
->
log_fd
,
0
));
return
lxc_unpriv
(
ftruncate
(
terminal
->
log_fd
,
0
));
}
}
static
int
lxc_
console
_rotate_log_file
(
struct
lxc_terminal
*
terminal
)
static
int
lxc_
terminal
_rotate_log_file
(
struct
lxc_terminal
*
terminal
)
{
{
int
ret
;
int
ret
;
size_t
len
;
size_t
len
;
...
@@ -315,7 +315,7 @@ static int lxc_console_write_log_file(struct lxc_terminal *terminal, char *buf,
...
@@ -315,7 +315,7 @@ static int lxc_console_write_log_file(struct lxc_terminal *terminal, char *buf,
* file so simply return. There's no error on our side here.
* file so simply return. There's no error on our side here.
*/
*/
if
(
terminal
->
log_rotate
>
0
)
if
(
terminal
->
log_rotate
>
0
)
ret
=
lxc_
console
_rotate_log_file
(
terminal
);
ret
=
lxc_
terminal
_rotate_log_file
(
terminal
);
else
else
ret
=
lxc_terminal_truncate_log_file
(
terminal
);
ret
=
lxc_terminal_truncate_log_file
(
terminal
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
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