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
89962c6c
Unverified
Commit
89962c6c
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: always dump log file
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
39c6cdb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
console.c
src/lxc/console.c
+1
-7
No files found.
src/lxc/console.c
View file @
89962c6c
...
@@ -219,7 +219,6 @@ static int lxc_console_rotate_log_file(struct lxc_console *console)
...
@@ -219,7 +219,6 @@ static int lxc_console_rotate_log_file(struct lxc_console *console)
size_t
len
;
size_t
len
;
char
*
tmp
;
char
*
tmp
;
/* rotate the console log file */
if
(
!
console
->
log_path
||
console
->
log_rotate
==
0
)
if
(
!
console
->
log_path
||
console
->
log_rotate
==
0
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
...
@@ -281,7 +280,6 @@ static int lxc_console_write_log_file(struct lxc_console *console, char *buf,
...
@@ -281,7 +280,6 @@ static int lxc_console_write_log_file(struct lxc_console *console, char *buf,
return
lxc_write_nointr
(
console
->
log_fd
,
buf
,
bytes_read
);
return
lxc_write_nointr
(
console
->
log_fd
,
buf
,
bytes_read
);
}
}
/* check how much space we have left */
space_left
=
console
->
log_size
-
st
.
st_size
;
space_left
=
console
->
log_size
-
st
.
st_size
;
/* User doesn't want to rotate the log file and there's no more space
/* User doesn't want to rotate the log file and there's no more space
...
@@ -313,7 +311,7 @@ static int lxc_console_write_log_file(struct lxc_console *console, char *buf,
...
@@ -313,7 +311,7 @@ static int lxc_console_write_log_file(struct lxc_console *console, char *buf,
/* Calculate how many bytes we still need to write. */
/* Calculate how many bytes we still need to write. */
bytes_read
-=
space_left
;
bytes_read
-=
space_left
;
/* There be more to write but we aren't instructed to rotate the log
/* There
'd
be more to write but we aren't instructed to rotate the log
* 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
(
console
->
log_rotate
>
0
)
if
(
console
->
log_rotate
>
0
)
...
@@ -720,10 +718,6 @@ int lxc_console_write_ringbuffer(struct lxc_console *console)
...
@@ -720,10 +718,6 @@ int lxc_console_write_ringbuffer(struct lxc_console *console)
if
(
console
->
log_size
==
0
)
if
(
console
->
log_size
==
0
)
return
0
;
return
0
;
/* The log file is rotated. */
if
(
console
->
log_rotate
==
0
)
return
0
;
used
=
lxc_ringbuf_used
(
buf
);
used
=
lxc_ringbuf_used
(
buf
);
if
(
used
==
0
)
if
(
used
==
0
)
return
0
;
return
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