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
e32fd783
Unverified
Commit
e32fd783
authored
May 11, 2018
by
l00355512
Committed by
Christian Brauner
May 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support case ignored suffix for sizes
suffix of console max size and console buffer max size Signed-off-by:
l00355512
<
liuhao27@huawei.com
>
parent
ea47aec0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
lxc.container.conf.sgml.in
doc/lxc.container.conf.sgml.in
+10
-8
utils.c
src/lxc/utils.c
+3
-3
No files found.
doc/lxc.container.conf.sgml.in
View file @
e32fd783
...
...
@@ -819,15 +819,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ringbuffer. Note that ringbuffer must be at least as big as a
standard page size. When passed a value smaller than a single page
size liblxc will allocate a ringbuffer of a single page size. A page
size is usually 4
k
B.
size is usually 4
K
B.
The keyword 'auto' will cause liblxc to allocate a ringbuffer of
128
k
B.
128
K
B.
When manually specifying a size for the ringbuffer the value should
be a power of 2 when converted to bytes. Valid size prefixes are
'kB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'kb' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.)
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
And ignored case, for example 'kB', 'KB' and 'Kb' is same.)
</para>
</listitem>
</varlistentry>
...
...
@@ -843,15 +844,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<option>lxc.console.logfile</option>. Note that size of the log file
must be at least as big as a standard page size. When passed a value
smaller than a single page size liblxc will set the size of log file
to a single page size. A page size is usually 4
k
B.
to a single page size. A page size is usually 4
K
B.
The keyword 'auto' will cause liblxc to place a limit of 128
k
B on
The keyword 'auto' will cause liblxc to place a limit of 128
K
B on
the log file.
When manually specifying a size for the log file the value should
be a power of 2 when converted to bytes. Valid size prefixes are
'kB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'kb' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.)
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
And ignored case, for example 'kB', 'KB' and 'Kb' is same.)
If users want to mirror the console ringbuffer on disk they should set
<option>lxc.console.size</option> equal to
...
...
src/lxc/utils.c
View file @
e32fd783
...
...
@@ -2450,11 +2450,11 @@ int parse_byte_size_string(const char *s, int64_t *converted)
return
0
;
}
if
(
!
strc
mp
(
suffix
,
"k
B"
))
if
(
!
strc
asecmp
(
suffix
,
"K
B"
))
mltpl
=
1024
;
else
if
(
!
strcmp
(
suffix
,
"MB"
))
else
if
(
!
strc
asec
mp
(
suffix
,
"MB"
))
mltpl
=
1024
*
1024
;
else
if
(
!
strcmp
(
suffix
,
"GB"
))
else
if
(
!
strc
asec
mp
(
suffix
,
"GB"
))
mltpl
=
1024
*
1024
*
1024
;
else
return
-
EINVAL
;
...
...
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